This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes  static synchronized block Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark " static synchronized block" Watch " static synchronized block" New topic

static synchronized block

Santosh Shiroor

Joined: May 18, 2008
Posts: 1
Difference between static synchronized block and synchronized block.
Nitesh Kant

Joined: Feb 25, 2007
Posts: 1638

Originally posted by Santosh Shiroor:
Difference between static synchronized block and synchronized block.

I assume you are asking difference between a static synchronized method and synchronized method.
The difference is the object that is used as a monitor.
A static synchronized method uses the static member variable "class" as the monitor and synchronized method uses "this" as the monitor.

apigee, a better way to API!
I agree. Here's the link:
subject: static synchronized block
Similar Threads
Need Clarification