Synchronized methods and blocks allow a thread to lock an object on entry and unlock the object on exit (to the method or block).
同步的方法和代码块允许线程在入口处锁定对象并在出口处解锁(针对方法或代码块)。
2
When I first started this exercise to examine the effectiveness of Hotspot applied lock optimizations, I figured it would take a couple hours of my time and in the end I've have a useful blog entry.