Javatpoint Logo
Javatpoint Logo

Java InetAddress getAddress() method

The getAddress method of Java InetAddress class returns the IP address associated with this object as an array of bytes in network order. That means the first element of the array contains the highest order byte, and the last element of array contains the lowest order type.

Syntax:

Returns

The getAddress() method of Java InetAddress class returns the raw IP address of this object.

Example 1

Test it Now

Output:

1. [B@1540e19d
2. [B@677327b6

Next TopicInetAddress Class





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