From Mike:
Thread1 gets the lock, prints the message, issues a useless notify, releases the lock, gets the lock again, and waits (this releases the lock).
Thread2 gets the lock, prints the message, issues a notify, and releases the lock.
Thread1 gets the lock again, releases the lock, and finishes.
Thread2 gets the lock and waits forever because Thread1 already issued its notify.
I have few question regarding ur mentioned points:
[LIST]
1) In the first point u have said at the end the Thread 1 gets the lock again, and waits()(
this releases the lock)
how is this possible?
2) I came to know that there are two thread objects created, these threads are not sharing a common object. They both are running on different objects. So ur fourth point looks non existing. Am i right?
I guess Vipin's answer to the solution seems to be on the right track. Anyways, more feedbacks on these would be really effective
Waiting for ur replies
thanks