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

Options

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

Click to view Correct Answer

Previous || Next

AutoCloseable, Closeable and Flushable Interfaces more questions

AutoCloseable and Flushable are part of which package?

Does close() implicitly flush() the stream.

How does applet and servlet communicate?

In CGI, process starts with each request and will initiate....

What does bind() method of ServerSocket offer?

What is the difference between AutoCloseable and Closeable?

What is the use of Flushable interface?

Which class provides system independent server side implementation?

Which version of java added Flushable interface?

How can we move from one desired step to another....

Annotations more Online Exam Quiz

Annotations

Application Lifecycle - Ant, Maven and Jenkins

Client and Server

Debugging in Eclipse

Design Patterns

Java Beans

JDBC