What Happens If Serversocket Is Not Able To Listen On The #1250
What happens if ServerSocket is not able to listen on the specified port?
This multiple choice question (MCQ) is related to the book/course gs gs128 Java. It can also be found in gs gs128 Java Server Technologies Servlet - Client and Server in Java - Quiz No.1.
What happens if ServerSocket is not able to listen on the specified port?
The system exits gracefully with appropriate message
The system will wait till port is free
IOException is thrown when opening the socket
PortOccupiedException is thrown