Check out example codes for "wait method in java". It will help you in understanding the concepts better.

Code Example 1

java.lang.Object.wait() causes current thread to wait until another thread 
invokes the notify() method or the notifyAll() method for this object.

Learn ReactJs, React Native from akashmittal.com