Continuation is a way to capture the execution state in a script, exit the engine while making an external call, then later restore the execution state and resume the script right after the external call, optionally capturing its results.
Continuations are useful for user interface, where the traditional non-linear event-driven or model-view-controller patterns can be replaced with simple control logic (sequence, condition, loop, etc.) This is called inversion of control.
In contemporary context, continuation is interesting for web development. The script is executed at the server and the external routines, which exit the engine, are the web screens, whose alternation represents the user interface.
The continuation pattern is used in process modeling applications such as Service-Oriented Architecture, where process engines are used such as BPEL. There, the exits are web services and the state is captured in a data source.
(How) can it be done in J?
See links below for examples.