Java InetAddress getByAddress() methodThe getByAddress() of Java InetAddress class returns an InetAddress object created from the raw IP address. Syntax:Parameters:addr - the raw IP address in network byte order. ReturnsThe getByName() method returns an InetAddress object created from the raw IP address. ThrowsUnknowHostException - If IP address is of illegal length. Example 1Test it NowOutput: [127,0,0,1]
Next TopicInetAddress Class
|