// Thread2.java

// Simple thread example that implements the Runnable interface.

// by Mark Allen Weiss, revised by Kip Irvine
// Updated 12/27/2002

import java.lang.Thread;

class MyRunThread implements Runnable 
{
  public void run( )
  {
    for( int i = 0; i < 50; i++ )
    	System.out.println( " MyRunThread " + i );
  } 
}

class ThreadDemo 
{
	public static void main( String[] args ) 
	{
     	Thread t1 = new Thread ( new MyRunThread ( ) );	
     	
     	t1.start( );
     	
     	for( int i = 0; i < 50; i++ )
      		System.out.println( "main thread " + i );
	}
}
