/***
 * A tiny application to demonstrate Threads
 * by passing an object which implements the Runnable
 * interface into the constructor of a thread.
 * 
 * @author Mitch Fincher
 *
**/
public class ThreadExample2 implements Runnable {
Thread thread = null;

public void run()
    {
	int i=0;
	System.out.println("ThreadExample2 run(): ");
	while(i < 10)
	    {
		System.out.print(" "+i++);
		try{Thread.sleep(1000);}catch(Exception e){}
	    }
    }

public static void main(String argv[])
  {
      ThreadExample2 threadExample2 = new ThreadExample2();
      System.out.println("ThreadExample2.main() ");
      threadExample2.thread = new Thread(threadExample2);
      threadExample2.thread.start();
  }
} // class ThreadExample2
