RHE page 230 Ex.6
public class TestThread2 extends
Thread {
public void run(){
System.out.println("Starting");
yield();
System.out.println("Done");
}
public static void main(
String args []){
TestThread2 tt = new TestThread2();
tt.start();
}
}
I ran this code and confirmed boths lines from the run(); are printed.
I realized Calling yield(); only moves the running thread to the Ready state If there�s
a higher priority thread in the waiting pool. Can anyone confirm that??