I just found this exam question in an old exam paper and am readying myself for an upcoming exam. I cannot figure it out :
The following depicts a contrived partial
Your Iterator must implement all the methods from the Iterator interface in order to encapsulate the iteration logic.
Iterator
In your case, it will have to hold the current iteration index in the array. You can look at ArrayIterator from commons-collections