package cn.itcast.com.javase;
class myLock{ //构建两把不同的锁,实现两把锁的嵌套
public static final Object locka=new Object();
public static final Object lockb=new Object();
public void run(){
}
public class DeadLocktest {
public static void main(String[] args) {
ContentofSyn a=new ContentofSyn(true);
ContentofSyn b=new ContentofSyn(false);
Thread t1=new Thread(a);
Thread t2=new Thread(b);
}
}