00001 public class Deadlock 00002 { 00003 static Lock lock2; 00004 static Lock lock1; 00005 00006 public static void main (java.lang.String[] args) 00007 { 00008 lock1 = new Lock(); 00009 lock2 = new Lock(); 00010 Process1 p1 = new Process1(); 00011 Process2 p2 = new Process2(); 00012 p1.start(); 00013 p2.start(); 00014 } 00015 }