public static
InetAddress getByName(String host) throws UnknownHostException
For example,
try {
InetAddress utopia = InetAddress.getByName("utopia.poly.edu");
InetAddress duke = InetAddress.getByName("128.238.2.92");
// work with address....
}
catch (UnknownHostException e) {
System.err.println(ex);
}