An ArrayList can be iterated using traditional for loop. One can use Iterator along with for loop. Review the following code:

Java Code:
 
ArrayList<Integer> arrayList = new ArrayList<Integer>();
arrayList.add(10);
arrayList.add(20);
arrayList.add(30);


// using traditional for loop
for(int i=0;i<arrayList.size();i++)
{
System.out.println(arrayList.get(i));
}


// using traditional for loop with iterator
for(Iterator i = arrayList.iterator();i.hasNext();)
{
System.out.println(i.next());
}