实现Runnable接口
package com.chen.lesson03;
public class TestThread3 implements Runnable{
@Override
public void run() {
for (int i = 0; i < 100; i++){
System.out.println("run"+i);
}
}
public static void main(String[] args) {
for (int i = 0; i < 1000; i++){
System.out.println("start"+i);
}
TestThread3 testThread3 = new TestThread3();
new Thread(testThread3).start();
}
}