public class Taest extends Thread{
public void run(){
for(int i=0;i<50;i++)
System.out.println(i);
}
public static void main(String[] agrs){
Taest a=new Taest();
Taest b=new Taest();
a.start();
try{
Thread.sleep(10);
b.start();
}catch(InterruptedException e){
}
}
}
请问sleep(),休眠的是哪个线程?是main线程还是线程a?
慕娘9325324
宝慕林4294392
MMMHUHU
相关分类