Implementation of a particular type of monitor construct in Java

In computer science the monitor type is a synchronization construct of an high-level language. An instance of a type monitor can be used by two or more processes or threads to make mutually exclusive access to shared resources. The advantage of using the monitor comes from the fact that you should not encode any explicit mechanism for achieving mutual exclusion, since the monitor allows only one process is active inside.