This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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.
Consider Paul's rocket mass heater.
subject: notify and notifyAll
Similar Threads
Help correct this calculator thread
wait and notify
Threading discrepancies
dubt in notifyAll
wait(), notify(), notifyAll() doubt