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
D. PortOccupiedException is thrown
Answer: Option C
Join The Discussion