Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What does an Iterator do?
Think about how you move through a line of people.
What operation would you use to print each element in a list?
Remember the action to perform for each item.
What does the removeIf method do in a collection?
Think about filtering out elements.
True or False: The ListIterator can only traverse a list in one direction.
Consider how people can move in a room.
Create a custom class and demonstrate the use of an Iterator to traverse through a collection of objects of that class, printing their properties.
Focus on object-oriented design.
Given a list of integers, use the replaceAll and removeIf methods to first delete all even numbers and then square all the remaining odd numbers.
Think about filtering and transforming in one go.
6 more questions in this section. Enroll free to practise them all.
Enroll free