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 notify and notifyAll 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 "notify and notifyAll" Watch "notify and notifyAll" New topic

notify and notifyAll

Soni Prasad
Ranch Hand

Joined: Mar 09, 2005
Posts: 97
I was trying a sample code from K&B, I dont know why I am unable to see difference in notify and notifyAll

In the above code I am using notify but it is notifying all the tree threads why??? It should have notified only one of them.
[ April 17, 2005: Message edited by: Barry Gaunt ]

SCJP 1.4, SCBCD 1.3
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Please use tags to enable people to read and interpret your code better. I've edited your post above.

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
I agree. Here's the link:
subject: notify and notifyAll
It's not a secret anymore!