关键字:Synchronized和lock_关键字synchronized和lock-CSDN博客文章浏览阅读110次。synchronized是Java的关键字,当它用来修饰一个方法或者一个代码块的时候,能够保证在同一时刻最多只有一个线程执行该段代码。JDK1.5以后引入了自旋锁、锁粗化、轻量级锁,偏向锁来有优化关键字的性能。Lo...... admin2023-11-11