scjp一道线程基础练习题求助
public class threadT extends Thread {
public void run() {
System.out.println("In run");
yield();
System.out.println("Leaving run");
}
public static void main(String args []) {
(new threadT()).start();
}
}
为什么在 yield()之后还会打印出Leaving run?不是已经停止了吗?谢谢
------解决方案--------------------