About Question enthuware.ocpjp.v7.2.1467 :
Posted: Wed Aug 10, 2016 6:50 am
I answered "calling someObject.wait()" (no doubt about this) and "someObj.notify()" (which should be "Thread.yield()" according to the answers).
I was under impression that the scheduler is completely free to ignore the Thread.yield() hint (as stated in Javadoc) whereas in notify() current thread is guaranteed to pause, at least for a moment, so that other awaiting thread would be notified and awakened.
I was under impression that the scheduler is completely free to ignore the Thread.yield() hint (as stated in Javadoc) whereas in notify() current thread is guaranteed to pause, at least for a moment, so that other awaiting thread would be notified and awakened.