FileDocCategorySizeDatePackage
ExtendThread.javaAPI DocExample1492Tue May 01 16:43:28 BST 2001None

ExtendThread

public class ExtendThread extends Object

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

         NewThread et = new NewThread();  // create a new thread of execution object

         try
            {
              for(int i=5; i>0; i--)
                 {
                   System.out.println("Main Thread : " + i);
                   Thread.sleep(1000);  //put main thread to sleep yeild the CPU
                 }
             }
         catch(InterruptedException e)
             {
               System.out.println("Main thread interrupted.");
             }
         System.out.println("Main thread exiting.");