未验证 提交 98ae0e7b 编写于 作者: S SnailClimb 提交者: GitHub

Update ArrayList.md

上级 aff1f0ae
......@@ -85,7 +85,7 @@ public class ArrayList<E> extends AbstractList<E>
}
/**
*默认构造函数,其默认初始容量为10
*默认构造函数,DEFAULTCAPACITY_EMPTY_ELEMENTDATA 为0.初始化为10,也就是说初始其实是空数组 当添加第一个元素的时候数组容量才变成10
*/
public ArrayList() {
this.elementData = DEFAULTCAPACITY_EMPTY_ELEMENTDATA;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册