ArrayList iterator
- Make sure you have the geometrie resource. If necessary, see the Resources import webpage.
- The code below creates a list with some points. Which statement uses the iterator attached to this list?
- Memory diagram of an iterator displays 4 attributes. What is the name of the one which gives access to the list of items?
- Using the iterator, what is the statement which get the first item of the list
- What is the cursor attribute of the iterator?
- What test shows whether the iterator still provides a list item?
- Write an iteration that displays all the elements of the list, using an iterator.
Select the step-by-step option to check the evolution of the cursor attribute.
- Make sure that the behavior of your iteration is similar to the one given below, which explicitly uses the iterator and associated functions. Select the step-by-step option to understand the behavior of the iterator.