File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Synchronizing Static Methods" Watch "Synchronizing Static Methods" New topic

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: 3028
Yes, they are.
I agree. Here's the link:
subject: Synchronizing Static Methods
It's not a secret anymore!