class ThreadDemo{
public static void main(String[] args) {
Thread1 a = new Thread1();
a.start();
for (int i=0;i<50;i++ ) {
System.out.println("main......");
}
}
}
class Thread1 extends Thread {
public void run(){
for (int i=0;i<60;i++ ) {
System.out.println("Thread.....");
}
}
}
为什么打印的都是打印完一个在打印另一个,线程始终是一个啊 |
|