synchronized的实现机制是什么?

答案解析

依赖JVM的monitorenter和monitorexit指令实现。每个对象有一个监视器(monitor),线程获取monitor后才能进入同步块。