in Education by
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 The question was asked in an international level competition. Query is from Client and Server in section Java Server Technologies & Servlet of Java Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The correct answer is (c) IOException is thrown when opening the socket The best I can explain: public ServerSocket() creates an unbound server socket. It throws IOException if specified port is busy when opening the socket.

Related questions

0 votes
    What does bind() method of ServerSocket offer? (a) binds the serversocket to a specific address (IP Address ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What happens if IP Address of host cannot be determined? (a) The system exit with no message (b) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    Which of these methods sets every element of a List to a specified object? (a) set() (b) fill() ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    How can we get the size of specified file? (a) capacity(path) (b) size(path) (c) length(path) ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What happens when a constructor is defined for an interface? (a) Compilation failure (b) Runtime Exception ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What happens when the value of variable change? (a) changed value pop on the screen (b) variable ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    What kind of an exception will be thrown if the string to parse is not valid JSON? (a) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
...