FileDocCategorySizeDatePackage
MultiThread.javaAPI DocExample1600Tue May 01 16:43:48 BST 2001None

MultiThread

public class MultiThread extends Object

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

        MultiRun nrf = new MultiRun("first thread");
        MultiRun nrs = new MultiRun("second thread");
        MultiRun nrt = new MultiRun("third thread");
                 
                   
         try
            {
              
              Thread.sleep(10000);  //put main thread to sleep yeild the CPU
                 
             }
         catch(InterruptedException e)
             {
               System.out.println("Main thread interrupted.");
             }
         System.out.println("Main thread exiting.");