Multiple choice technology programming languages

A thread that has called the wait() method of an object still owns the lock of the object.

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The wait() method explicitly releases the object lock before putting the thread to wait. The thread must wait for another thread to call notify() or notifyAll() on the same object, then reacquire the lock before resuming execution. This mechanism enables inter-thread communication by allowing other threads to access the synchronized object while one thread waits.