1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Guide
7b22f0a166
Merge pull request #2657 from Slade66/main
[docs fix]修正错别字
2025-04-07 07:15:05 +08:00
Slade
6042bc3286
[docs fix]修正错别字 2025-04-06 20:13:28 +08:00

View File

@ -475,8 +475,8 @@ synchronized static void method() {
对括号里指定的对象/类加锁:
- `synchronized(object)` 表示进入同步代码前要获得 **给定对象的锁**
- `synchronized(类.class)` 表示进入同步代码前要获得 **给定 Class 的锁**
- `synchronized(object)` 表示进入同步代码前要获得 **给定对象的锁**
- `synchronized(类.class)` 表示进入同步代码前要获得 **给定 Class 的锁**
```java
synchronized(this) {