Quoted from JCHQ:
As true is notorious for staying true this, code looks at first glance like it will just loop forever. The wait method however effectively means give up the lock on the object and wait until the notify or notifyAll method tells you to wake up.
My question is, when the waiting thread gets notified, does the flow go to line 3 in the catch block, or, go to line 1 in the loop? I'm very confused.
Thanks,
Jenny