Thread1 and Thread2 are trying to get an Object lock,only one
thread can get the lock ..take as Thread1 ,then Thread2 will be Non-Runnable
If Thread1 calls wait,then it goes to blocked State or non-runnable state and thread2 gets the lock and enters the Synchronized code.
After this,if
Thread2 issues wait,it goes to blocked state. Now what about Thread2,
will it gets the lock and moves to Running state? (as there are only 2 threads)