Enumeration in Vectors and Iterator in Collection classes

Can any body tell me whats the main difference in Enumereation used for Vectors and Iterator in Collections Classes.(Still they have the same job to do that is to step through the collection)
[198 byte] By [airforce7a] at [2007-11-26 18:02:01]
# 1

Yep, both an Enumeration and an Iterator hop over the elements of a

collection. An iterator can (optionally) remove a current element but an

Enumeration can not. The Enumeration class is an old class and it

existed far before the Collection framework saw the light.

Consider it a legacy class that needs to be used sometimes but prefer

an Iterator when you can.

kind regards,

Jos

JosAHa at 2007-7-9 5:31:45 > top of Java-index,Java Essentials,Java Programming...
# 2
Thankyou very much for help! it will definately help me .
airforce7a at 2007-7-9 5:31:45 > top of Java-index,Java Essentials,Java Programming...