volatile vs. synchronize, which one for objects? [duplicate]
Possible Duplicates:
Difference between volatile and synchronized in JAVA (j2me) Difference between synchronization of field reads and volatile
According to java documentations, I f开发者_如何学Goound volatile works like synchronized about objects. I was wondering if volatile is faster than synchronized or not? or it would cause any side effect to use volatile instead of synchronized keyword?
精彩评论