aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Object's Lock 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 "Object Watch "Object New topic
Author

Object's Lock

Marcelo Ortega
Ranch Hand

Joined: May 31, 2005
Posts: 519


Are the notify() and wait() methods implemented correctly? I was expecting the output to be from 0 to 10 with no double nor numbers missing, but i am actually get doubles AND number missing...
[ July 07, 2005: Message edited by: Barry Gaunt ]

SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD, SCEA/OCMJEA

Live life to an interface, not an implementation!
janki tangeda
Ranch Hand

Joined: Jun 07, 2005
Posts: 54
I have just started reading on java threads and i have a question on the code you wrote.Don't we use wait() method to wait for some condition to be met.I don't see any such condition here.For e.g. in getValue() method, is it not required to check if the value is updated and wait until the updating is done.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Object's Lock