(1)synchronized(myclass-class)用于静态方法中 static void myMethod() { synchronized(MyClass.class) { //code } } 注:静态方法中只能用synchronized(MyClass.class),不能用synch Read More
posted @ 2019-12-28 22:35 护花使者 Views(387) Comments(0) Diggs(0) Edit