Collection coll = new Vector(); //LinkedList(); //ArrayList();
coll.add("Tody");
coll.add("is");
coll.add("Sunday.");
// Output all elements by iterator
Iterator it = coll.iterator();
while(it.hasNext()) {
System.out.print(it.next() + " ");
}
温馨提示:内容为网友见解,仅供参考