FileDocCategorySizeDatePackage
anon.javaAPI DocExample316Thu Apr 03 15:24:08 BST 1997None

anon.java

import java.net.*;
import java.io.*;

public class anon {

  public static void main(String[] args) {

    try {
      ServerSocket httpd = new ServerSocket(0);
      System.out.println("This server runs on port " + httpd.getLocalPort());
    }
    catch (IOException e) {
      System.err.println(e);
    }

  }

}