Skip to content

Commit 2efc1b8

Browse files
committed
✏️ Fixing typos.
1 parent 15ee295 commit 2efc1b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MD/ConcurrentHashMap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
首先也是通过 Key 的 Hash 定位到具体的 Segment,在 put 之前会进行一次扩容校验。这里比 HashMap 要好的一点是:HashMap 是插入元素之后再看是否需要扩容,有可能扩容之后后续就没有插入就浪费了本次扩容(扩容非常消耗性能)。
4646

47-
而 ConcurrentHashMap 不一样,它是先将数据插入之后再检查是否需要扩容,之后再做插入
47+
而 ConcurrentHashMap 不一样,它是在将数据插入之前检查是否需要扩容,之后再做插入操作
4848

4949
### size 方法
5050

0 commit comments

Comments
 (0)