| Author |
Simple q on collection
|
Dinesh Tahiliani
Ranch Hand
Joined: Aug 06, 2007
Posts: 486
|
|
Can any tell me the difference between Iterator ane Enumeration? Pls explain with eg..
|
Thanks<br />Dinesh
|
 |
Freddy Wong
Ranch Hand
Joined: Sep 11, 2006
Posts: 959
|
|
|
I don't think this is a question that should be asked in the advanced forum. Anyway, Iterator allows you remove the item, Enumeration doesn't. Basically, Iterator can do whatever the Enumeration can.
|
SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12911
|
|
Enumeration is part of the old Java collections API (from Java 1.1 and older). In Java version 1.2, the new collections framework was added. Iterator is part of the new collections framework. The old classes like Enumeration, Vector and Hashtable were not removed to ensure backwards compatibility. See The Collections Framework.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: Simple q on collection
|
|
|