为什么用了lock锁后线程还是不安全,输出了两次100,其他正常输出

class ThreadText{
public static void main(String[] args) {
MyThread1 myThread11=new MyThread1();
MyThread1 myThread1111 =new MyThread1();
myThread11.setName("窗口1");
myThread1111.setName("窗口2");
myThread11.start();
myThread1111.start();
}
}
class MyThread1 extends Thread {
static Object object=new Object();
static int num=100;
ReentrantLock lock= new ReentrantLock(true);
@Override
public void run(){

        while(num>=0){
            lock.lock();
            System.out.println(Thread.currentThread()+":"+num);
            num--;
            lock.unlock();
        }
    }

}

获取锁的位置放在While循环前面试试