以List的子类ArrayList来举例这些方法:
package com;
import java.util.ArrayList;
import java.util.List;
public class javaCollection {
public static void main(String[] args) {
List list = new ArrayList();
list.add("Jack");
list.add(true);
list.add(10); //自动装箱
System.out.println(list);
list.remove(0);
System.out.println(list);
System.out.println(list