class Z
{
public void say()
{
System.out.println("你把书给我,我把画给你");
}
public void get()
{
System.out.println("Z得到书了");
}
}
class L
{
public void say()
{
System.out.println("你把画给我,我把书给你");
}
public void get()
{
System.out.println("L得到画了");
}
}
class DeadLock implements Runnable
{
static Z z=new Z();//为什么只有持有静态对象引用的锁,才能死锁
static L l=new L();//为什么只有持有静态对象引用的锁,才能死锁
boolean flag;
public void run()
{
while(true)
{