// This appears in Core Web Programming from
// Prentice Hall Publishers, and may be freely used
// or adapted. 1997 Marty Hall, hall@apl.jhu.edu.

public class ThreadedClass extends AnyClass
                           implements Runnable {
  public void run() {
    // Thread behavior here
    // If you want to access thread instance (e.g. to
    // get private per-thread data), use
    // Thread.currentThread().
  }

  public void startThread() {
    Threat t = new Thread(this);
    t.start(); // Calls back to run method in "this"
  }

  ...
}

