造成java多线程死锁的代码
private Object ob1 = new Object();
private Object ob2 = new Object();
public void call1(){
synchronized(ob1){
synchronized(obj2){
doing.....
}
}
}
public void call2(){
synchronized(obj2){
synchronized(obj1){
doing...
}
}
}