Javatpoint Logo
Javatpoint Logo

Java ServerSocket getInetAddress() Method

The getInetAddress() method of ServerSocket class returns the local address of given server socket. This method will continue to return the local address after the socket is closed.

Syntax

Returns:

The address to which this socket is bound, or null if the socket is unbound.

Example 1

Output:

Java ServerSocket getInetAddress() Method

Example 2

ServerApplication

ClientApplication:

Output:

Java ServerSocket getInetAddress() Method
Java ServerSocket getInetAddress() Method
Next TopicJava ServerSocket





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA