This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Mughal says: Classes also have class-specific moniors which is is analogous to the object monitor. Such a monitor is actually a monitor on the Class object of the class huh?..... what is the difference between obtaining a lock on an object and getting a lock on the class ...??
The lock is similar with variable. A lock of a object is realted to the instance , if you have many objects of the same class in program ,they will monitor independent locks owned by themselves;But the class lock is only one which is shared by all instance. The lock of class is analogus to the static variable. Do I say it clear?
petfishIf, The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements. Thanks.
"JavaRanch, where the deer and the Certified play" - David O'Meara