try{
Thread.sleep((int)(Math.random()*100+1));
}
catch(InterruptedException e){
Thread.yield();
}
上面这段程序打错了,应是:
try{
Thread.sleep((int)(Math.random()*100+1));
}
catch(InterruptedException e){ }
Thread.yield();
结果还不影响.
Thread.sleep((int)(Math.random()*100+1));
}
catch(InterruptedException e){
Thread.yield();
}
上面这段程序打错了,应是:
try{
Thread.sleep((int)(Math.random()*100+1));
}
catch(InterruptedException e){ }
Thread.yield();
结果还不影响.
优先级高的先执行