Advanced Java
Q96 / 100

What is the CompletableFuture and how does it differ from Future?

Correct! Well done.

Incorrect.

The correct answer is B) CompletableFuture supports non-blocking composition (thenApply, thenCompose); Future only offers blocking get()

B

Correct Answer

CompletableFuture supports non-blocking composition (thenApply, thenCompose); Future only offers blocking get()

Explanation

CompletableFuture (Java 8) enables asynchronous pipelines with thenApply, thenCompose, whenComplete, etc. Future.get() blocks the calling thread until completion.

Progress
96/100