
目录
ArrayList
linkedList
ArrayList
继承关系
public abstract class AbstractCollection implements Collection
public abstract class AbstractList extends AbstractCollection implements List
public class ArrayList extends AbstractListimplements List, RandomAccess, Cloneable, java.io.Serializable
查询
E get(int index);
public E get(int index) {
Objects.checkIndex(index, size);//校验长度
return elementData(index);
}
@ForceInline
public static int checkIndex(int index, int length) {
return Preconditions.checkIndex(index, length, null);
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)