摘要:
class Test { public static void main(String[] args) { Demo d1=new Demo(true); Demo d2=new Demo(false); Thread t1=new Thread(d1); Thread t2=new Thread(d2); t1.start(); t2.start(); }}class MyLock{ public static final Object locka=new Object(); public static final Object lockb=new Object();}class... 阅读全文