Suppose you use the URLGet program in Section 21.5 to get a web page that does not exist on a server (which does exist) . Assuming that the server is otherwise working properly, what will happen?
A) The call to openConnection will throw an exception.
B) The call to getResponseCode will return the error code 404.
C) The call to getResponseMessage will return null.
D) The call to getInputStream will throw an exception.
Correct Answer:
Verified
Q23: The _ program is a useful tool
Q25: What are the steps involved in designing
Q28: To connect to the HTTP port (80)
Q30: Which of the following HTTP commands supplies
Q30: Which code fragment creates a server running
Q34: A _ is an object that encapsulates
Q35: Write a code fragment that connects to
Q36: Which of the following is not an
Q56: For test protocols, turn the socket streams
Q57: _ objects are used for communication (IO)
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents