给你个答案:
public static void main(String[] args) {
List list=new ArrayList();
list.add("king");
list.add("super");
list.add("admin");
Iterator iterator=list.iterator();
while(iterator.hasNext()){
String str=(String)iterator.next();
System.out.println(str);
} |
|