标签:android开发
作用是将集合中的元素遍历,取出来
举个例子:
import java.util.ArrayList;
import java.util.Iterator;
public class Test {
public static void main(String argv[]) {
ArrayList list = new ArrayList();
list.add(1);
list.add(2);
list.add(3 );
Iterator it = list.iterator();
while(it.hasNext()){
int s = (Integer)it.next();
System.out.println(s);
}
}
}
标签:android开发
原文地址:http://blog.csdn.net/u010778159/article/details/45438743