![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hashmap
ξ!
学习不止~
展开
-
jdk8的hashmap中扩容方法源码注释
关于树的以后再更新 final Node<K,V>[] resize() { Node<K,V>[] oldTab = table; int oldCap = (oldTab == null) ? 0 : oldTab.length; int oldThr = threshold; int newCap, newThr = 0; if (oldCap > 0) { if (o原创 2020-11-12 15:02:05 · 209 阅读 · 2 评论 -
jdk8 hashMap源码注释
源码中调用的其他方法以后更 源码注释: final V putVal(int hash, K key, V value, boolean onlyIfAbsent, boolean evict) { Node<K,V>[] tab; Node<K,V> p; int n, i; if ((tab = table) == null || (n = tab.length) == 0) // 判断原创 2020-11-12 14:23:02 · 144 阅读 · 2 评论