| Author |
iterator vs Enumeration
|
vara prasad
Ranch Hand
Joined: Dec 21, 2004
Posts: 47
|
|
|
what is the difference between iterator and Enumeration
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24061
|
|
Iterator is newer than Enumeration, and its method names are shorter because it was felt that the old ones were too long and awkward. Also, Iterator has an optional method that lets you remove the current element from a collection -- Enumeration doesn't have that. In any case, Iterator is meant as a replacement for Enumeration. You shouldn't use Enumeration unless you're forced to by a legacy API.
|
[Jess in Action][AskingGoodQuestions]
|
 |
 |
|
|
subject: iterator vs Enumeration
|
|
|