Skip to main content

Java中有两种加锁的方式:一种是用synchronized关键字,另一种是用Lock接口的实现类。