![](https://csdnimg.cn/release/download_crawler_static/86973452/bg6.jpg)
this(values.length*2);
values数组容量的空表
//若values==null,用空对象调用方法,Java抛出空对象异常
NullPointerException
for (int i=0; i<values.length; i++)
this.element[this.n++] = values[i];
public void set(int i, T x){
throw new NullPointerException("x==null");
if (i>=0 && i<this.n)
this.element[i] = x;
else throw new
java.lang.IndexOutOfBoundsException(i+"");//抛出序号越界异常
public int insert(int i, T x){
throw new NullPointerException("x==null");
if (i<0) i=0;
//抛出空
//插入位
//插入在
//数组变
//若数组
Object[] source = this.element;
量引用赋值,source也引用element数组
if (this.n==element.length)
满,则扩充顺序表的数组容量
........................................