Skip to content
Sharp

Networking · interview question

Which method on CompletableFuture can be used to combine results of two independent asynchronous computations?

Multiple choiceMediumchapter-11-curatedpremiumnetworkingasynchronous-http
Choose one answer
Answer and explanation

Correct answer

C. ThenCombine

Why

The thenCombine method is used to combine the results of two separate CompletableFutures once both complete. It allows them to run independently and then use their results together in a new computation.

Test yourself on Networking

A free test with instant, explained results. No account needed.

Start free test
All Networking questions →