首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

java 静态方法同步有关问题

2013-03-25 
java 静态方法同步问题java 静态方法同步问题Every method of java will have a stack, and every invokat

java 静态方法同步问题
java 静态方法同步问题
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.

热点排行