HashMap源碼-擴容resize方法

環境:jdk1.8 resize方法源碼以下: final Node<K,V>[] resize() { Node<K,V>[] oldTab = table; //獲取舊錶的容量值 int oldCap = (oldTab == null) ? 0 : oldTab.length; //獲取舊的閾值 int oldThr = threshold;
相關文章
相關標籤/搜索