先在方法中把Condition condition = lock.newCondition();写好粘贴至方法外面就好
一般情况下是不能在方法外面调用对象的方法的,但为什么lock.newCondition()就可以呢?