方法remove(int index)
用于从列表中删除指定索引的元素。它删除一个元素并返回相同的元素。如果指定的索引小于零或大于列表的大小(ArrayList
的索引大小),则抛出IndexOutOfBoundsException
。
public Object remove(int index)
例
输出:
方法remove(int index)
用于从列表中删除指定索引的元素。它删除一个元素并返回相同的元素。如果指定的索引小于零或大于列表的大小(ArrayList
的索引大小),则抛出IndexOutOfBoundsException
。
public Object remove(int index)
例
输出: