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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Synchronizing Static Methods" Watch "Synchronizing Static Methods" New topic
Author

Synchronizing Static Methods

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
Are these 3 methods synchronized on the same lock? That is, are static methods synchronized on the class object for the class?

In thread 1

In thread 2

Mike Simmons
Ranch Hand

Joined: Mar 05, 2008
Posts: 2969
    
    9
Yes, they are.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Synchronizing Static Methods
 
Similar Threads
Class Wide Lock..??
some question about static methods and Thread safety , please
Thread and String literal pool
Reg : Synchronization access
synchronized keywords in static methods