/**
   Beispiel fuer Threads
   @author Benedikt Großer, Holger Arndt
   @version 16.05.2003
*/
class RandomRun extends Thread
{
  // Konstruktor
  public RandomRun(String str) { super(str); }

  // ueberschreibe die Methode run()
  public void run()
  {
    for (int i = 0; i < 10; i++)
      {
        System.out.println(i + " mal " + getName());
        try
	  {
	    sleep((int)(Math.random() * 1000));
	  }
	catch (InterruptedException e) {}
      }
    System.out.println("Die Antwort lautet: " + getName());
  }
}

