as per my understanding, this is how the control flows or should flow(correct me if wrong) :
1. non-daemon
thread invokes Main()
2. checkEquality() API is called.
3. threads t1, t2 created on the same object - obj.
4. t1 invokes start(), goes into synchronized block of run() method...is interrupted by wait() call...
5. t2 invokes start(), goes into synchronized block of run() ... (only after that monitor lock is relinquished by t1.wait())..completes the execution and notify thread t1.
6. t1 completes it's execution of run().
but i am getting the above mentioned output. I am aware that i'm trying to do wait()/notify() on object whose monitor is not acquired by the calling thread. But, i am not able to find the problematic code portion.
Thanks in adv...