Question: ResizableArray array = new ResizableArray(20); // add some String objects to the array object iterator i = array.iterator(); while (i.hasNext() { System.out.println(i.next()); } Please java

ResizableArray array = new ResizableArray(20);
// add some String objects to the array object
iterator i = array.iterator();
while (i.hasNext() {
System.out.println(i.next());
}
Please java code only.
16.7 Iterating the resizable array With an array, one can start a for-each loop. With this class, that is not possible. We will make it possible in a certain way as well. Looping through an array-like structure is called iterating. First define an interface called Iterator. It is generic, so Iterator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
