We all know that in order to invoke Object.wait(), this call must be placed in synchronized block, otherwise an IllegalMonitorStateException is thrown. But what\'s t
When you call notify() from an object t, java notifies a particular t.wait() method. But, how does java search and notify a particular wait method.
java only looks into the synchronized block of code which was locked by object t. java cannot search the whole code to notify a particular t.wait().