Page 1 of 1

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

Posted: Wed Jul 13, 2022 7:50 pm
by answerhappygod
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