Networking
Networking
Answer: b) java.net
Which method is used to get the response code from an HTTP connection?
Answer: b) getResponseCode()
Which class is used for reading and writing data over HTTP?
Answer: b) HttpURLConnection
What is the purpose of the DatagramSocket constructor that takes a port number?
Answer: b) Create a socket bound to that port
Which method is used to get the address of the sender from a DatagramPacket?
Answer: b) getAddress()
What is the role of the DatagramSocket constructor that takes both port and
address?
Answer: c) Create a socket bound to an address and port