1. 程式人生 > >Resolving ip-address of a hostname

Resolving ip-address of a hostname

InetAddress address = InetAddress.getByName("www.example.com"); 
System.out.println(address.getHostAddress());