This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

enumeration and question

 
Jackie Wang
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am still confused about oct19, 2001 posting for enumeration.
1) Can anyone tell me how I can implement that using
Enumartion with Iterator? any what's the relationship b/n interface?
2)I realize that know that there is an interface called Collection but also an a class called
Collections which confused me.
Please help.
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jackie Wang:
I am still confused about oct19, 2001 posting for enumeration.
1) Can anyone tell me how I can implement that using
Enumartion with Iterator? any what's the relationship b/n interface?

Unfortunately, I have no idea which post you're talking about. If you have a question about a post (no matter how old it is), you can always post a reply to it and it'll pop to the top of the list so others can respond to it. At least link to it or post the question here so that we know what you're talking about.

2)I realize that know that there is an interface called Collection but also an a class called
Collections which confused me.

The Collection interface is the contract that all collections utilize, such as List and Set. The Collections class, on the other hand contains a large number of static utility methods for use on Collection objects. For example, you can sort collections, search them, reverse them, etc, with the methods in the Collections class.
I hope that helps,
Corey
 
Jackie Wang
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually just wonder anyone can help me and explain about the enumeration and how to implement it?
What I know is nothing more than (next element) and (has more elements). but i have no idea how to use it.
Thanks!
 
Richard Selva
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following for loop used to enumerate a Vector v:

for(Enumeratione=v.elements();e.hasMoreElements()
{
System.out.println(e.nextElement());
}
selva
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic