All pastes #268457 Raw Edit

Stuff

public java v1 · immutable
·published 2006-12-05 19:17 UTC
rendered paste body
public class TestClass {	static class FirstThread extends Thread {		public void run( ) {			for ( int loopCount = 0; loopCount < 10; loopCount++ ) {				System.out.println( "firstThread" );				try {					this.sleep( 100 );				} catch (InterruptedException e) { }			}		}	}	static class SecondThread extends Thread {		public void run( ) {			for ( int loopCount = 0; loopCount < 10; loopCount++ ) {				System.out.println( "secondThread" );				try {					this.sleep( 100 );				} catch (InterruptedException e) { }			}		}	}			public static void main( String[] args ) {		Thread firstThread = new TestClass.FirstThread( ),		       secondThread = new TestClass.SecondThread( );				firstThread.start( );		secondThread.start( );	}}