175k views
4 votes
Why are iterators useful?

Select one:
a. Iterators prevent infinite loops
b. Iterators are easier to loop over than a while loop
c. Iterators walk down a collection faster than a for loop.
d. Iterators give you direct access to private variables.
e. Improve information hiding by not revealing how a collection class is implemented

1 Answer

5 votes
It is d because I said it is
User Kevin Pope
by
7.1k points