有时候不是很注意,只是觉得自己了解,但是又觉得不了解。看下面的E文才明白。
Every method of java will have a stack, and every invokation on that method will have it's own 'stack frame'. So the locale data of one method invokation will not affect others.
Please do not confuse 'synchronization' with 'atomic'.
If one static method is synchronized, JVM will use the Class as the lock. If not, it acts as an instance method.