This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Why Iterator is better than Enumeration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Why Iterator is better than Enumeration" Watch "Why Iterator is better than Enumeration" New topic
Author

Why Iterator is better than Enumeration

Megha Jain
Ranch Hand

Joined: Sep 12, 2005
Posts: 30
i was reading one book......... in one example on Enumeration , it was written that as Enumeration is not good for new code........ use Iterator.
Both of them work in same manner........ so can anyone tell me why ?
Vijay Dogra
Greenhorn

Joined: Sep 16, 2004
Posts: 22
Hello,
You can refer to previous thread..
http://www.coderanch.com/t/202139/Performance/java/Enumeration-vs-Iterator
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

"Vijay" we have told you multiple times to change your display name to meet the JavaRanch naming policy. If you don't change it to be your real first and last names, I will have to suspend your account.

Hi Megha, I think I am going to move this to the Java In General (Beginner) forum because your question isn't really about J2ME Mobile Applications.

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
Don't get me started about those stupid light bulbs.
 
subject: Why Iterator is better than Enumeration