HERE IS THE CODE :
-------------------------
import java.net.InetAddress;
import java.net.UnknownHostException;
public class IPAddressToHostName {
public static void main(String[] args) {
try {
InetAddress host = InetAddress.getByName("74.125.236.146");
System.out.println(host.getHostName());
} catch (UnknownHostException ex) {
ex.printStackTrace();
}
}
}
KEEP SHARING KNOWLEDGE
No comments:
Post a Comment