日期:2014-05-18 浏览次数:20770 次
package Thread;
public class TestThread1 {
public static void main (String [] args ) {
Runner r = new Runner();
Thread t = new Thread (r);
t.start();
for (int i =0 ; i<= 100 ; i++ ) {
System.out.println("The Main --" + i);
}
}
}
class Runner implements Runnable {
public void run () {
for (int i = 0 ; i<= 100 ; i ++ ) {
System.out.println("The Runner --" + i);
}
}
}