my dog learned polymorphism*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes enum Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "enum" Watch "enum" New topic
Author

enum

av prince
Greenhorn

Joined: Mar 04, 2007
Posts: 9
why do Iterator do not extend Enumeration?

thanks,
Gavin Tranter
Ranch Hand

Joined: Jan 01, 2007
Posts: 333
Because they are different classes that do the same thing.

Enumeration, which is different to Enum, are the old way of interating though collections, this was replaced with the Iterator when sun started to change the Collection framework.
Burkhard Hassel
Ranch Hand

Joined: Aug 25, 2006
Posts: 1274
Howdy "avsuresh" !

Thanks for one of your first contributions to this forum and...

Welcome to the Ranch!




Hope you'll enjoy.




Only one small issue: The Java Ranch follows a certain policy regarding user names.
The main reasons why and a link how to change yours you'll find here:
http://www.javaranch.com/name.jsp


So, could you please change your user name before your next posting?
It will not affect anything you've already posted here. Just your user name will update.


I'm posting this because I am one of the moderators of this forum.


Yours,
Bu.


all events occur in real time
av prince
Greenhorn

Joined: Mar 04, 2007
Posts: 9
Originally posted by Gavin Tranter:
Because they are different classes that do the same thing.

Enumeration, which is different to Enum, are the old way of interating though collections, this was replaced with the Iterator when sun started to change the Collection framework.


Thanks a lot
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14116
    
  16

avsuresh - Don't forget what Burkhard said about your display name. We take the naming policy seriously on JavaRanch. If you do not change your display name, your account might be locked.

So please carefully read the naming policy and change your display name. Please note that your display name should consist of a real-sounding first name, space, and a second name. Not only a first name, no obviously fake nickname, no initials only for the second name.

You can change your name by editing your profile.

Jesper Young - Bartender


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
wood burning stoves
 
subject: enum