File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Thread - Wait Doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Thread - Wait Doubt" Watch "Thread - Wait Doubt" New topic

Thread - Wait Doubt

Micheal John
Ranch Hand

Joined: Nov 01, 2006
Posts: 344
From web page

In the above pgm, why the output is coming? pls explain

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
Ahmed Khan Mohammed

Joined: Dec 07, 2006
Posts: 13
When I ran the program I dont see any output. It just happened (on my machine) that the notify method was called before the wait method was called.
I modified the code.

The output is
after notify
going to wait
I agree. Here's the link:
subject: Thread - Wait Doubt
It's not a secret anymore!