Skip to content
Sharp

Networking · interview question

Why might you use CompletableFuture in an HTTP client implementation?

Multiple choiceHardchapter-11-curatedpremiumnetworkingsocket-programming
Choose one answer
Answer and explanation

Correct answer

B. To handle asynchronous requests efficiently

Why

CompletableFuture allows for non-blocking, asynchronous HTTP requests, enabling the program to handle other tasks while waiting for a response, thus improving efficiency.

Test yourself on Networking

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

Start free test
All Networking questions →