Synchronized locks the object, and when the object is initialized, the JVM calls the block of statements outside the method before the object is initialized, and the object does not exist, so there is no lock.
So what's the difference between static and non-static methods before adding synchronized?
As we all know, the static method belongs to the class method, it belongs to this class (note: The class here is not a specific object of Class), then static acquires the lock,
is the class (class) of the object that is currently calling this method, and is no longer a specific object produced by this class.
Instead of the lock acquired by the static method, it is the lock of the object that is currently calling this method. Therefore, they do not create mutual exclusion.
http://blog.csdn.net/virgoboy2004/article/details/7585182
Differences between static and non-static methods in the Java language for synchronized decoration (RPM)