Future Interface
This lesson discusses the Future interface.
We'll cover the following...
We'll cover the following...
Future Interface
The Future interface is used to represent the result of an asynchronous computation. The interface also provides methods to check the status of a submitted task and also allows the task to be cancelled if possible. Without further ado, let's dive into an example and see how callable and future objects work in tandem. We'll continue with our sumTask example from the previous lesson.
Thread pools implementing the ExecutorService return a future for their task submission ...