File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes what is syncronized with Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is syncronized with "syncronize" keyword" Watch "what is syncronized with "syncronize" keyword" New topic
Author

what is syncronized with "syncronize" keyword

Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
if i have a method, and i make it "syncronized", than when this method is accessed does whole object get locked, or just method can't be accessed from other places?


If you think you've done too much, usually it means you've done too few.
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
all methods on that instance get locked... unless the method is static ..


JDBCSupport - An easy to use, light-weight JDBC framework -
Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
Even those methods that are not declared "synchronized"?
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
no.. only those declared synchronized
Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
Got it! Mersi beaucoup!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is syncronized with "syncronize" keyword