This deals with concurrent programming. The wait() and notify() methods are designed to provide a mechanism to allow a thread to be block until a specific condition is met.
However, java.util.concurrent should be used instead of wait() and notify() to reduce complexity.