微信搜索:小大白日志
摘要: 当hashmap第一次插入元素、元素个数达到容量阀值threshold时,都会扩容resize(),源码: (假设hashmap扩容前的node数组为旧横向node数组,扩容后的node数组为新横向node数组) 1 final Node<K,V>[] resize() { 2 Node<K,V>[ 阅读全文
posted @ 2021-05-28 03:05 明天喝可乐 阅读(101) 评论(0) 推荐(0)