Saturday, March 14, 2009

How do I convert a numeric IP address like 192.18.97.39 into a hostname

Question :How do I convert a numeric IP address like 192.18.97.39 into a hostname
like java.sun.com? (Networking)


Answer :String hostname =
InetAddress.getByName("192.18.97.39").getHostName();

No comments: