Home > DeveloperSection > Interviews > How do I convert a numeric IP address like 192.18.97.39 into a hostname like java.sun.com?

Posted on    May-01-2015 12:26 AM

 Java Java 
Ratings:
 1 Answer(s)
  470  View(s)
Rate this:

Mayank Tripathi
Mayank Tripathi

Total Post:807

Points:4035
Posted on    May-01-2015 12:26 AM

By InetAddress.getByName("192.18.97.39").getHostName() where 192.18.97.39 is the IP address.

Don't want to miss updates? Please click the below button!

Follow MindStick