1.

Explain Purpose Of Completablefuture?

Answer»

CompletableFuture CLASS was introduced in Java 8 to represent the Future which can be completed by setting its value and status explicitly. It can be used as java.util.concurrent.CompletionStage. It supports DEPENDENT functions and actions which got triggered upon the future's COMPLETION. In java 9 CompletableFuture API has been enhanced further. Following are the relevant changes done to the API.

  1. Support for delays and timeouts.
  2. IMPROVED support for subclassing.
  3. New factory methods added.

CompletableFuture class was introduced in Java 8 to represent the Future which can be completed by setting its value and status explicitly. It can be used as java.util.concurrent.CompletionStage. It supports dependent functions and actions which got triggered upon the future's completion. In java 9 CompletableFuture API has been enhanced further. Following are the relevant changes done to the API.



Discussion

No Comment Found