Tuesday, March 8, 2016

MCQ

 MCQ No - 1

Which class creates a TCP server socket, bound to the specified port?

(A) Socket
(B) InetAddress
(C) ServerSocket
(D) DatagramSocket

C
MCQ No - 2

Which class implements a connectionless packet delivery service.

(A) ServerSocket
(B) DatagramSocket
(C) InetAddress
(D) DatagramPacket

D
MCQ No - 3

Which method of URL class returns the object of URLConnection class?

(A) getLocalHost()
(B) openConnection()
(C) getByName(String host)
(D) getHostAddress()

B
MCQ No - 4

A Socket Consists Of?

(A) Port+IP address
(B) Only IP address
(C) only Port address
(D) None of these

A
MCQ No - 5

Which method is establish a connection between server and client?

(A) accept()
(B) open()
(C) getLocalHost()
(D) openConnection()

A

MCQ No - 16

DatagramSocket() throws

(A) IOException
(B) UnknownHostException
(C) ClassNotFoundException
(D) SocketException

D
MCQ No - 17

UnknownHostException is immediate child class of_______?

(A) java.lang.Exception
(B) java.lang.IOException
(C) java.lang.Throwable
(D) java.lang.Object

B
MCQ No - 18

Port numbers range from _____ to ______.

(A) 0 to 65535
(B) 1 to 65536
(C) -65535 to 65536
(D) 0 to 1024

A
MCQ No - 19

_________ Protocol is more efficient in terms of both latency and bandwidth.

(A) TCP
(B) UDP
(C) SMTP
(D) FTP

B
MCQ No - 20

Which of the following is NOT true about User Datagram Protocol in transport layer?

(A) Works well in unidirectional communication, suitable for broadcast information.
(B) It does three way handshake before sending datagrams.
(C) It provides datagrams, suitable for modeling other protocols such as in IP tunneling or Remote Procedure Call and the Network File System.
(D) The lack of retransmission delays makes it suitable for real-time applications.

No comments:

Post a Comment

Configure LOG4J in INTELLIJ in Windows.

IntelliJ debugger for temporary logging In this video, it is shown how to use Log4j in Intellij. Sorry for the audio quality :) Log4j zip fi...