concept asynchronous task in category java

This is an excerpt from Manning's book Modern Java in Action: Lambdas, streams, reactive and functional programming.
You can see that the invocation of the getPriceAsync method returns far sooner than when the price calculation eventually finishes. In section 16.4, you learn that it’s also possible for the client to avoid any risk of being blocked. Instead, the client can be notified when the Future is complete and can execute a callback code, defined through a lambda expression or a method reference, only when the result of the computation is available. For now, we’ll address another problem: how to manage an error during the execution of the asynchronous task.

This is an excerpt from Manning's book Java 8 in Action: Lambdas, streams, and functional-style programming.
You can see that the invocation of the getPriceAsync method returns far sooner than when the price calculation eventually finishes. In section 11.4 you’ll learn that it’s also possible for the client to avoid any risk of being blocked. Instead it can just be notified when the Future is completed, and execute a callback code, defined through a lambda expression or a method reference, only when the result of the computation is available. For now we’ll address another problem: how to correctly manage the possibility of an error occurring during the execution of the asynchronous task.