以上方法中,同步代码块和同步代码都是隐式锁
Lock l = new ReentrantLock():自己创建一把锁
Lock l = new ReentrantLock()
lock():加锁 unlock():解锁
lock()
unlock()
还以上面卖票的代码为例