Phase 1 Language Basics + Advanced _1-3-Java language senior _05- abnormal and multi-threaded _ Section 3 thread synchronization mechanism _7_ static synchronized method






Because the method is static, so variables will have to be static. Static access static

can also ensure the security thread

Lock object static method





Here on this block of code error. 

Use Runnablec.class can lock object is the only guarantee of





 

Guess you like

Origin www.cnblogs.com/wangjunwei/p/11260556.html