Skip to content
Sharp

Networking · interview question

In Java's HttpClient, which exception is specifically thrown for timeout situations?

Multiple choiceEasychapter-11-curatedpremiumnetworkingtimeouts-and-retries
Choose one answer
Answer and explanation

Correct answer

B. HttpTimeoutException

Why

HttpTimeoutException is specifically thrown when a timeout occurs during an HTTP operation. It allows developers to handle timeout scenarios separately from other I/O exceptions.

Test yourself on Networking

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

Start free test
All Networking questions →