Skip to content
Sharp

Networking · interview question

Which class in Java is primarily used for HTTP requests and responses?

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

Correct answer

A. HttpClient

Why

HttpClient is the class used for HTTP requests and responses. It provides a modern, flexible, and efficient API for handling HTTP connections.

Test yourself on Networking

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

Start free test
All Networking questions →