/*
 * Created on 2005-5-13
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package org.chapter2;

import java.util.*;
/**
 * @author Administrator
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class IterList {

	public static void main(String[] args) {
		List list = new ArrayList();
		for ( int i=0 ;i<10;i++){
			list.add(new Integer(i));
		}
		Iterator iter =list.iterator();
		while(iter.hasNext()){
			System.out.print((Integer)iter.next()+" ");
		}
		System.out.println();
	}
}
