Skip to content
Sharp

Collections · interview question

Why might you choose to use a ListIterator over a basic Iterator for a List?

Multiple choiceHardchapter-4-curatedpremiumcollectionsiteration-and-traversal
Choose one answer
Answer and explanation

Correct answer

B. To modify elements during iteration

Why

ListIterator allows not only removal but also modification of elements during iteration, providing additional methods like set() to change the current element.

Test yourself on Collections

A free test with instant, explained results. No account needed.

Start free test
All Collections questions →