The Java API provides the FutureTask class as a cancelable asynchronous computation. It implements the Runnable and Future interfaces and provides the basic implementation of the Future interface. We can create a FutureTask class using a Callable or Runnable object (Runnable objects doesn't return a result, so we have to pass as parameter too in this case the result that the Future object will return). It provides methods to cancel the execution and obtain the result of the computation. It also provides a method called done() that allows you to execute some code after the finalization of a task executed in an executor. It can be used to make some postprocess operations, such as generating a report, sending results by e-mail, or releasing some resources. This method is called internally by the FutureTask class when the execution of the task that this FutureTask object...
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine