// Demonstrate InetAddress import java.net.*; class InetAddressTest { public static void main(String args[]) throws UnknownHostException { InetAddress Address = InetAddress.getLocalHost(); System.out.println(Address); Address = InetAddress.getByName("starwave.com"); System.out.println(Address); InetAddress SW[] = InetAddress.getAllByName("www.nba.com"); for ( int i = 0; i < SW.length; i++ ) System.out.println(SW[i]); InetAddress SW1[] = InetAddress.getAllByName("www.nascar.com"); for ( int i = 0; i < SW1.length; i++ ) System.out.println(SW1[i]); InetAddress SW2[] = InetAddress.getAllByName("www.nfl.com"); for ( int i = 0; i < SW2.length; i++ ) System.out.println(SW2[i]); InetAddress SW3[] = InetAddress.getAllByName("www.duettech.com"); for ( int i = 0; i < SW3.length; i++ ) System.out.println(SW3[i]); } }