Skip to content

Commit

Permalink
✏️ Fixing typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
crossoverJie committed Aug 3, 2018
1 parent 15ee295 commit 2efc1b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MD/ConcurrentHashMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

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

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

### size 方法

Expand Down

0 comments on commit 2efc1b8

Please sign in to comment.