Skip to content
Sharp

Networking · interview question

In the context of Java's HttpClient, what does setting a timeout ensure?

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

Correct answer

A. Limits the time for establishing a connection

Why

A timeout setting in an HttpClient configuration limits the time spent trying to establish a connection or waiting for data, helping to avoid hanging operations.

Test yourself on Networking

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

Start free test
All Networking questions →