Callable and Future

The Callable interface is similar to the Runnable object, but it can return any type of object, which helps us to get a result or status from a Callable task.

The Callable task returns the Future object, which is used for getting the result of an asynchronous operation. Its uses include providing a couple of methods to check whether the asynchronous execution is completed or not and retrieving the result of the computation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset