import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class ListTest {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
List list=new ArrayList<String>();
list.add("one");
list.add("two");
list.add("three");
for(Iterator i=list.iterator();i.hasNext();){
System.out.println(i.next());
}
List oList=new ArrayList<String>();
oList.addAll(list);
oList.add("five");//输出拷贝后的list
for(Iterator i=oList.iterator();i.hasNext();){
System.out.println(i.next());
}
//输出原始list
for(Iterator i=list.iterator();i.hasNext();){
System.out.println(i.next());
}
}
}