在多线程中,在synchronise方法上加上static 表示的是类锁,锁住的是整个类。而synchroinized 锁住的是当前方法,当前对象。

 

 

synchronized加static区别

相关文章: