In server socket programming, which line correctly binds the server to port 5000?

Last Updated :
Discuss
Comments

In server socket programming, which line correctly binds the server to port 5000?

new ServerSocket(5000);


ServerSocket.bind(5000);


ServerSocket.connect(5000);


ServerSocket.listen(5000);


Share your thoughts in the comments