package com.yourcompany.struts.action;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class IteratorEx {
/**
* @param args
*/
public static void main(String[] args) {
List list = new ArrayList();
list.add("1ds");
list.add("2ds");
list.add("3ds");
list.add("4ds");
Iterator iter = list.iterator();
String str = "";
while (iter.hasNext()) {
str = (String) iter.next();
System.out.println(str);
}
str = null;
}
}