Vidyalelo
Java Programming · Q49

Java Server and Servlet

Programming · Java Programming · question 49

Q49

What happens if ServerSocket is not able to listen on the specified port?

A.
The system exits gracefully with appropriate message
B.
The system will wait till port is free
C.
IOException is thrown when opening the socket
Answer
D.
PortOccupiedException is thrown

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board