![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
集合源码
double鱼
这个作者很懒,什么都没留下…
展开
-
HashMap源码阅读
这里看下jdk1.8源码先看下相关的属性static final int DEFAULT_INITIAL_CAPACITY = 1 << 4; // aka 16 /** * The maximum capacity, used if a higher value is implicitly specified * by either of the constructors with arguments. * MUST be a power of tw原创 2020-11-15 18:26:34 · 104 阅读 · 0 评论 -
ArrayList扩容源码
ArrayList这里主要记录一下ArrayList的扩容操作。因为之前学习的时候就想过,既然有扩容操作,那么有没有减容操作。看了一下remove的源码public E remove(int index) { rangeCheck(index); modCount++; E oldValue = elementData(index); int numMoved = size - index - 1; if (numMov原创 2020-11-14 18:33:07 · 102 阅读 · 0 评论