This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

enum

 
av prince
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why do Iterator do not extend Enumeration?

thanks,
 
Gavin Tranter
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1274
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
av prince
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15494
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic