Skip to content

Commit 79e6952

Browse files
authored
Update Java 容器.md
1 parent 7275246 commit 79e6952

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/Java 容器.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ Node<K,V> next:next就是用于链表的指向。
251251

252252
#### 2.put方法分析
253253

254-
map.put("a","b")的整个流程:
255254

256255
map.put("a","b")的整个流程:
257256

@@ -470,8 +469,7 @@ ReentrantLock 来进行加锁,所以每次需要加锁的操作锁住的是一
470469
使用了 CAS 操作来支持更高的并发度,在 CAS 操作失败时使用内置锁 synchronizedsynchronized只锁定当前链表或红黑二叉树的首节点,这样只要hash不冲突,就不会产生并发,效率又提升N倍。
471470

472471

473-
474-
## **HashSet **
472+
## HashSet
475473

476474
实现原理: HashSet底层由HashMap实现 ,值存放于HashMap的key上 ,HashMap的value统一为PRESENT
477475

0 commit comments

Comments
 (0)