Iterators

An Iterator for Arrays

Traditional Method of Iterating Through an Array

int [] arr = new int [...];
...			
for (int i = 0; i < arr.length; i++) {
	// Do something with arr[i]
} 
That's fine, but: OK, it's pushing it a bit, but: Wouldn't it be better to have a consistent mechanism for iteration?

Revisiting the Iterator Interface

An Iterator for Arrays

An Iterator for DynArr

Why a Separate Object for the Iterator?