FileDocCategorySizeDatePackage
MyName.javaAPI DocExample360Sun Dec 12 10:51:44 GMT 2004None

MyName

public class MyName extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


    try {
      InetAddress address = InetAddress.getLocalHost();
      System.out.println("Hello. My name is " +  address.getHostName());
    }
    catch (UnknownHostException e) {
      System.out.println("I'm sorry. I don't know my own name.");
    }