-1

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?

abc
  • 37
  • 1
  • 10
  • 1
    Is this a homework question? Have you read the JavaDoc, or done any research? – SimonC Oct 24 '13 at 04:46
  • see this http://stackoverflow.com/questions/289434/how-to-make-a-java-thread-wait-for-another-threads-output – Hardik Oct 24 '13 at 04:51
  • @Hardik - I am here to clarify my doubt. If you do not have interest in it, better not to reply with your absurd comments. – abc Oct 24 '13 at 05:12

1 Answers1

2

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