http://ifeve.com/monitors-java-synchronization-mechanism/
The monitor is used for synchronization, it is a mechanism, not an object, but we have a saying of "obtaining the monitor of the object", (just accept)
The monitor is obtained through the synchronzied keyword
--------
wait
The current thread must own this object monitor. This thread releases ownership of this monitor and waits until notify
another notifyAll
thread wakes up by calling the method, or method notifying the thread waiting on this object's monitor. The thread will then wait until it regains ownership of the monitor before continuing.
--------
notify
Wakes up a single thread waiting on this object's monitor. If all threads are waiting on this object, one of them will be chosen to wake up. The choice is arbitrary and happens when a decision is made on the implementation. The thread waits on the object's monitor by calling one of the wait
methods .