Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can we Do Calss Level Locking

 
sirisha makkapati
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can We Do Class Level Locking in Java,How can We Achieve this.
Thanks..
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean somewhat like:



The same happens when you synchronize a static method.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic