Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aff1f0a commit 98ae0e7Copy full SHA for 98ae0e7
Java相关/ArrayList.md
@@ -85,7 +85,7 @@ public class ArrayList<E> extends AbstractList<E>
85
}
86
87
/**
88
- *默认构造函数,其默认初始容量为10
+ *默认构造函数,DEFAULTCAPACITY_EMPTY_ELEMENTDATA 为0.初始化为10,也就是说初始其实是空数组 当添加第一个元素的时候数组容量才变成10
89
*/
90
public ArrayList() {
91
this.elementData = DEFAULTCAPACITY_EMPTY_ELEMENTDATA;
0 commit comments