Programming - Sockets
You Are Here :: Home > JAVA > Sockets - General Questions
1. |
_______________ programming is most widely used concept in networking.
|
A. |
network |
B.
|
object |
C.
|
socket
|
D.
|
net
|
|
Answer: Option C
Explanation:
Socket programming is most widely used concept in networking. |
|
2. |
_________________ provides the communication mechanism between the computers using TCP
|
A. |
network |
B.
|
object |
C.
|
socket
|
D.
|
net
|
|
Answer: Option C
Explanation:
Socket provides the communication mechanism between two computers using TCP. |
|
3. |
The _________________ class represents a socket.
|
A. |
java.net.Socket |
B.
|
java.net.ServerSocket |
C.
|
java.lang
|
D.
|
java.sql
|
|
Answer: Option A
Explanation:
The java.net.Socket class represents a socket. |
|
4. |
The __________________________ class provides a mechanism for the server program to client for clients and establish connections with them.
|
A. |
java.net.Socket |
B.
|
java.net.ServerSocket |
C.
|
java.lang
|
D.
|
java.sql
|
|
Answer: Option B
Explanation:
The java.net.ServerSocket class provides a mechanism for the server program to client for clients and establish connections with them. |
|
5. |
The server instantiates a ________________ object,denoting which port number communciation is to occurs on.
|
A. |
Serversocket |
B.
|
serversocket |
C.
|
ServerSocket
|
D.
|
SocketServer
|
|
Answer: Option C
Explanation:
The server instantiates a ServerSocket object. |
|
6. |
The server invokes the _________________________ method of the ServerSocket class.
|
A. |
destroy() |
B.
|
stop() |
C.
|
init()
|
D.
|
accept()
|
|
Answer: Option D
Explanation:
accept() method invokes server through ServerSocket class. |
|
next »