Concurrent Programming with Java
Lab Manual, Version 1.0, F. Astha Ekadiyanto,
2002.
In the previous page, you may notice some new keywords such as synchronized,
wait(), and notifyAll() (or notify()).
These can be observed in the State Diagram Below.
The figure below shows an example of how this Demonstration looks like.
Once you have figured out how these work, you might be able to solve the
Problem in the Race Condition section.
First of all create a new BlueJ Project called MonitorDemo and then implement the codes: