Assume the following method is properly synchronized and called from a thread A on an object B:
wait(2000);
After calling this method, when will the thread A become a candidate to get another turn at the CPU?
Assume the following method is properly synchronized and called from a thread A on an object B:
wait(2000);
After calling this method, when will the thread A become a candidate to get another turn at the CPU?
wait(2000 ) releases the lock on B, and puts the thread A into a wait state. it means that it has to wait for another thread 'b' to complete its execution atleast for 2 seconds otherwise it will go to Runnable state, but not running