Threads on Java related Questions and Answers


Question :   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?

1. After thread A is notified, or after two seconds
2. After the lock on B is released, or after two seconds.
3. Two seconds after thread A is notified.
4. Two seconds after lock B is released.
Answer :   1 - After thread A is notified, or after two seconds  

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter