Traversing an array

An indexed for loop from 0 while i is less than length visits every element and can change it, while an enhanced for loop hands over a copy of each element, so it can read the array but not replace what's in it.

From AP Computer Science A.