具体可以看JDK的注解 This method should only be called by a thread that is the owner of this object's monitor. A thread becomes the owner of the object's monitor in one of three ways: * By executing a synchronized instance method of that object. * By executing the body of a synchronized statement that synchronizes on the object. * For objects of type Class, by executing a synchronized static method of that class.
* By executing the body of a synchronized statement that synchronizes on the object.
* For objects of type Class, by executing a synchronized static method of that class.