FileDocCategorySizeDatePackage
getLocalPortExample.javaAPI DocExample296Thu Apr 03 15:25:10 BST 1997None

getLocalPortExample

public class getLocalPortExample extends Object

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

    
    try {
      DatagramSocket ds = new DatagramSocket();
      System.out.println("The DatagramSocket is on port " + ds.getLocalPort());
    }
    catch (SocketException e) {
    }