如何在Java列表集合中使用remove(obj),remove(index)和removeAll()方法?
remove(intindex)-从调用列表中删除位置index处的元素,并返回已删除的元素。结果列表被压缩。也就是说,后续元素的索引减一。
removeRange(intfromIndex,inttoIndex)-删除所有索引介于fromIndex(包括)和toIndex(不包括)之间的所有元素。
removeAll(Collection<?>c)-从此列表中删除所有包含在指定集合中的元素(可选操作)。