Q&A
Q&AWhat happens when a Java thread calls wait()?
It must own the monitor, releases that monitor, and waits until notified or interrupted.
Read the concise answer
Object.wait() requires ownership of that object’s monitor. The thread releases that monitor and enters a waiting state until notification, interruption, timeout, or spurious wakeup; it must reacquire the monitor before returning. Always wait in a while loop that rechecks the condition, and use higher-level concurrency utilities where possible.