Programming - Sockets
You Are Here :: Home > JAVA > Sockets - General Questions
7. |
On the server side,the _______________ method returns a reference to a new socket on the server that is connected to the client's socket.
|
A. |
destroy() |
B.
|
stop() |
C.
|
init()
|
D.
|
accept()
|
|
Answer: Option D
Explanation:
accept() method returns a reference to a new socket on the server that is connected to the client's socket. |
|
8. |
If the ________________ constructor does not throw an exception.
|
A. |
constructor() |
B.
|
serverSocket |
C.
|
accept()
|
D.
|
destroy()
|
|
Answer: Option B
Explanation:
It means that your application has successfully bound to the specified port and is ready for client request. |
|
9. |
________________ class represents as InternetProtocol(IP)
|
A. |
InetAddress |
B.
|
Inet |
C.
|
Socket
|
D.
|
Server
|
|
Answer: Option A
Explanation:
InetAddress class represents an InternetProtocol(IP). |
|
10. |
Is TCP/IP sockets is a connection-oriented link (or) not?
|
A. |
Yes |
B.
|
No |
C.
|
Cant say
|
D.
|
none
|
|
Answer: Option A
Explanation:
Yes,TCP/IP sockets is a connection-oriented link. |
|
11. |
How to create a ServerSocket Object?
|
A. |
Serversocket mystock=new ServerSocket(1234); |
B.
|
serversocket mystock=new serversocket(1234); |
C.
|
Serversocket mystock=new Serversocket(1234);
|
D.
|
ServerSocket mystock=new ServerSocket(1234);
|
|
Answer: Option A
Explanation:
Server Socket can be created as follows ServerSocket mystock=new ServerSocket(1234); |
|
12. |
The datagram communication protocol is also known as ________________
|
A. |
UDP |
B.
|
TCP |
C.
|
IP
|
D.
|
Wifi
|
|
Answer: Option A
Explanation:
UDP(User Datagram Protocol) used for datagram communication protocol. |
|
« prev
next »