小编war*_*ard的帖子

在Java中使用synchronized

有什么区别:

public synchronized void test(){}
Run Code Online (Sandbox Code Playgroud)

和

public void test() {
   synchronized(Sample.class){}
}
Run Code Online (Sandbox Code Playgroud)

java multithreading synchronized-block

1
推荐指数
1
解决办法
62
查看次数

标签 统计

java ×1

multithreading ×1

synchronized-block ×1