import java.io.*; import java.net.*; public class addr { public static void main(String a[]) throws Exception { InetAddress me = InetAddress.getByName("localhost"); PrintStream o = System.out; o.println("localhost by name =" + me ); InetAddress me2 = InetAddress.getLocalHost(); o.println("localhost by getLocalHost =" + me2 ); InetAddress[] many = InetAddress.getAllByName("microsoft.com"); for (int i=0; i