Create a class, SimpleArrayListIterator that extends the SimpleArrayList
and implements the Iterable<Object>
interface.
You will need to create an inner class that implements the Iterator<Object>
interface.
Recall that the SimpleArrayList
class has the following methods that may be
of use to you:
SimpleArrayList(Object[] elements)
- Constructor that accepts an array of elementsObject get(int index)
- returns the element at the location specified by indexStuck? You may find these lessons helpful: