FileDocCategorySizeDatePackage
MyDottedQuadAddress.javaAPI DocExample412Sun Dec 12 10:51:44 GMT 2004None

MyDottedQuadAddress

public class MyDottedQuadAddress extends Object

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


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