【Java集合-ArrayList】

2019-01-09  本文已影响0人  OutOfMemoryExce
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 = {};
}
上一篇 下一篇

猜你喜欢

热点阅读