Question: In problems 1 - 5, assume the Iterator iter has just been created for a list containing the Strings I 2 3. For each line
In problems 1 - 5, assume the Iterator iter has just been created for a list containing the Strings "I" "2" "3". For each line of code, supply information in the rem that indicates the state of the list upon completion of code (indicate the cursor position with a comma). Also, state what's returned. Object obj =iter.next(); //1. iter.remove; //2. obj = iter.next(); //3. boolean state = iter.hasNext(); //4. for (int i=1;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
