Assignment AJP
Assignment AJP
Assignment AJP
2. Which class is used to create servers that listen for either local client or remote
client programs?
a. ServerSockets
b. httpServer
c. httpResponse
d. None of the above
a. DatagramSocket(int port)
b. DatagramSocket(int port, InetAddress address)
c. DatagramSocket()
d. None of the abov
a. DatagramSocket
b. DatagramPacket
c. Both A & B
d. None of the above
6. Which method of URL class represents a URL and it has complete set of methods to
manipulate URL in Java?
a. java.net.URL
b. java.net.URLConnection
c. Both A & B
d. None of the above
7. Which package provides core functionality?
a. java.net
b. java.rmi
c. java.lang
d. java.math
8. The DatagramSocket and DatagramPacket classes are not used for connection-less
socket programming.
a. True
b. False
a. IPaddress of Server
b. Port number
c. Both A & B
d. None of the above
10. The URLConnection class can be used to read and write data to the specified
resource referred by the URL
a. True
b. False
11. Datagram is basically an information but there is no guarantee of its content, arrival
or arrival time.
a. True
b. False
a. Socket
b. IP Address
c. Protocol
d. MAC Address
a. Socket
b. IP Address
c. Protocol
d. MAC Address
14. In InetAddress class which method returns the host name of the IP Address?
15. Which steps occur when establishing a TCP connection between two computers
using sockets?