【Java集合-ArrayList】
public class ArrayList<E> extends AbstractList<E>
implements List<E>, RandomAccess, Cloneable, java.io.Serializable
{
//1.7与1.8的相同属性
private static final long serialVersionUID = 8683452581122892189L;
private transient Object[] elementData;
//元素个数
private int size;
private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8;
//1.8新增默认数组初始化的大小+空Objec[]实例
private static final int DEFAULT_CAPACITY = 10;
private static final Object[] EMPTY_ELEMENTDATA = {};
private static final Object[] DEFAULTCAPACITY_EMPTY_ELEMENTDATA = {};
}
本文标题:【Java集合-ArrayList】
本文链接:https://www.haomeiwen.com/subject/nhygrqtx.html
网友评论