import java.util.*;
public class TestClass implements Runnable {
public static void main( String[] args ) {
new Thread( new TestClass() ).start();//多线程
loop();
}
public void run() {
loop();
}
public static void loop() {
for ( int i = 0 ; i < 30 ; i++ ) {
System.out.println( Thread.currentThread().getName()+" "+i );
}
}
}