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 synchronized methods 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 "synchronized methods" Watch "synchronized methods" New topic

synchronized methods

Sasikanth Malladi
Ranch Hand

Joined: Nov 04, 2000
Posts: 175
All, if a synchronized method calls a non synchronized one, I think the guarantee of only thread accessing the method won't extend to the non-synchronized one. Am I right?
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2398
There are scenarios where you could have multiple threads access the unsynchronized methods, but no other thread would use the unsynchronized method from within the synchronized method until it obtained a lock on the object.
I agree. Here's the link:
subject: synchronized methods
It's not a secret anymore!