From
web page In the above pgm (for all my pgm inmy JVM), first everything in the main
thread is executing and then only new thread is executed and I am also aware of Thread Scheduler is not guaranteed..
What my question is in the main thread itself notifyall/notify will be executed. without wait is executed in the new thread, which causes the pgm not to terminate..right? In the above pgm, notifyall() will be executed first, then wait() is executing, but nothing to notify() the wait(), since notifyall() is executed already..and as i expected this causes pgm not to be terminated, but it prints some number..how it is possible?can anyone explain this?
Micheal John
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT