Collection c=new ArrayList();
Iterator it=c.iterator();
注意:这里使用的是子类ArrayList里的获得迭代器的方法,在ArrayList里是采取内部类的方式,实现Iterator接口的方法。