// File:  WhoAmI.java

// Retrieve the (current) IP address for an Internet-connected computer

import java.net.*;

public class WhoAmI {

    public static void main(String[] args) throws Exception {
        if (args.length != 1) {
            System.err.println("Usage: WhoAmI MachineName or IP Address");
            System.exit(1);
        }

        InetAddress a = InetAddress.getByName(args[0]);
        System.out.println(a);
    }

}

// WhoAmI www.microsoft.com         -   www.microsoft.com/207.46.131.137
// WhoAmI www.hills.ccsf.cc.ca.us   -   hills.ccsf.cc.ca.us/147.144.1.2
// WhoAmI 147.144.1.2               -   hills.ccsf.cc.ca.us/147.144.1.2

