permaculture playing cards*
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "synchronized methods" Watch "synchronized methods" New topic
Author

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?
TIA,
Sashi
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
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: http://aspose.com/file-tools
 
subject: synchronized methods