Java Networking

¡Supera tus tareas y exámenes ahora con Quizwiz!

In which layer do socket applications belong? a. Application Layer b. Transport Layer c. Network Layer d. None of the above

a

What happens when a client requests connection to a server that has not yet started? a. The exception java.net.ConnectionException occurs b. The client gets blocked until the server is started c. The exception java.net.BindException occurs d. The client encounters a fatal error and must be terminated

a

Which of the following classes is used to create TCP server socket? a. ServerSocket b. DatagramSocket c. Socket d. MulticastSocket

a

Which of the following methods is used to listen to incoming connections? a. accept() b. listen() c. receive() d. get()

a

To obtain an InputStream on a socket sock, use __________. a. InputStream in = sock.obtainInputStream(); b. InputStream in = sock.getInputStream(); c. InputStream in = sock.getStream(); d. InputStream in = new InputStream(sock);

b

What is the full form of IPC? a. Inter-Process Computing b. Inter-Process Coommunnication c. Internal-Process Communications d. Integrated-Process Computing

b

Which of the following address pairs is known as socket address? a. MAC address, port b. IP address, port c. IP address, MAC address d. Source IP address, destination IP address

b

What is the full form of UDP? a. Useful Datagram Protocol a. Useful Datagram Packet c. User Datagram Protocol d. User Datagram Packet

c

Which of the following is used by a client to establish a socket connection with the server? a. Socket s = serverSocket.getSocket(); b. Socket s = serverSocket.accept(); c. Socket s = new Socket(ServerName, port); d. Socket s = serverSocket.connect();

c

Which of the following methods is used to receive a datagram? a. accept() b. get() c. receive() d. store()

c

Which of these packages contains classes and interfaces for networking? a. java.util.net b. java.util c. java.net d. java.network

c

What happens when a server uses a port to bind an object, but the port is not available? a. The object is bound successfully b. The server is blocked until the port is available c. The server encounters a fatal error and must be terminated d. The exception java.net.BindException occurs

d

What is the full form of TCP? a. Transmission Control Packet b. Transport Control Protocol c. Transfer Control Protocol d. Transmission Control Protocol

d

Which of the following IP address classes do multicasting addresses belong to? a. Class A b. Class B c. Class C d. Class D

d

Which of the following is used to get an InetAddress object on a socket object sock. a. sock.obtainInetAddress(); b. sock.retrieveInetAddress(); c. sock.InetAddress(); d. sock.getInetAddress();

d

Which of the following methods is used to assign a socket address to a socket? a. assign() b. attach() c. bound() d. bind()

d

Which of the following statements is used by the server to listen for a connection request from a client? a. Socket s = serverSocket.listen(); b. Socket s = serverSocket.wait(); c. Socket s = serverSocket.getSocket(); d. Socket s = serverSocket.accept();

d

Which of the following strings can be used for the host name to establish a socket connection with the server running on the same machine with the client? a. 127.0.0.1 b. InetAddress.getLocalHost() c. localhost d. All of the above

d


Conjuntos de estudio relacionados

Erhvervsøkonomi: Kapitel 7 - Virksomhedens omkostningsforhold

View Set

Civil Rights Acts (1964 and 1968) Voting Rights Act (1965)

View Set