简单的锁顺序死锁(不要这么做)
public class LeftRightDeadLock{private final Object left = new Object();private final Object right = new Object();public void leftRight(){synchronized (left){synchronized (right){//doSomthing();}}}public void rightLeft(){synchronized (right){synchronized (left){//doSomething();}}}
补充:综合编程 , 其他综合 ,