you can't call doSomething() on an instance of A unless you own that instance's lock.
But what about this?
Now you don't call doSomething() on an instance of A, because the method is static. It's useful to let static code be synchronized, so the designers of Java put a lock in each class, specifically to coordinate static synchronized code.
Consultant to SCJP team.<br />Co-designer of SCJD exam.<br />Co-author of "Complete Java 2 Certification Study Guide".<br />Author of "Ground-Up Java".