In my java application if user enters the IP we need to display the host name, if host name is given then we need to display the IP of the host.
For example if user
If you are coding in Java, try using InetAddress
InetAddress addr = InetAddress.getByName("173.194.36.37"); String host = addr.getHostName(); System.out.println(host);