ArrayListIterator next Quiz

public class ArrayList<E> implements List<E> {
  private E[] data;
  private int size;
   ...
  private class ArrayListIterator<E> implements Iterator<E> {
    private int nextIndex;
    ...
    public E next() { // May throw a NoSuchElementException
      // your code here.
    }
  }
}

The method must return the next item in the iteration.

Time remaining: