class RunUpExt   {

public static void main ( String [ ] args )  {
int delay1, delay2;
  if ( args.length == 2 )  {
  delay1 = Integer.parseInt ( args[0] );
  delay2 = Integer.parseInt ( args[1] );
  }  else  {
  delay1 = 10;  // default value
  delay2 = 55;  // default value
  }  // end else

  MyThread thread1 = new MyThread ( "Thread 1", delay1 );
  MyThread thread2 = new MyThread ( "            Thread 2", delay2 );

  thread1.start();
  thread2.start();
}  // end main

}  // end RunUpInt


class MyThread extends Thread  {
int delay;
String lbl;

MyThread ( String id, int d ) {
  super ( id );
  lbl = id;
  delay = d; ;
}  // end constructor

public void run ()  {
  try  {
    for ( int i = 0; i < 20; i++)  {
      System.out.println ( lbl + ": " + i );
      Thread.sleep ( delay );
    }  // end for
  }  // end try
  catch ( InterruptedException except)  {
    return;
  }  // end catch
}  // end run

}  // end MyThread
