public class DeadlockRisk { 
    private static class Resource { 
        public int value; 
    }     private Resource resourceA = new Resource(); 
    private Resource resourceB = new Resource();     public int read() { 
        synchronized (resourceA) { 
            synchronized (resourceB) { 
                return resourceB.value + resourceA.value; 
            } 
        } 
    }     public void write(int a, int b) { 
        synchronized (resourceB) { 
            synchronized (resourceA) { 
                resourceA.value = a; 
                resourceB.value = b; 
            } 
        } 
    } 
}看到一个线程死锁的例子
不明白这里的内部类为什么加了static 
new了之后是什么样的对象呢
不加static又是怎么样的呢