Java InetAddress getCanonicalHostName() methodThe getCanonicalHostName() method of java InetAddress class returns the fully qualified domain name for this IP address, that means we may not be able to return FQDN depending on underlying system configuration. Syntax:ReturnsIt returns the fully qualified domain name for this IP address, or if the operation is not allowed by the security check, the textual representation of the IP address. Example 1Test it NowOutput: 127.0.0.1
Next TopicInetAddress Class
|