| Author |
enumeration and question
|
Jackie Wang
Ranch Hand
Joined: Apr 18, 2002
Posts: 315
|
|
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
Joined: Dec 20, 2001
Posts: 3271
|
|
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
|
SCJP Tipline, etc.
|
 |
Jackie Wang
Ranch Hand
Joined: Apr 18, 2002
Posts: 315
|
|
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
Joined: Apr 10, 2002
Posts: 15
|
|
The following for loop used to enumerate a Vector v: for(Enumeratione=v.elements();e.hasMoreElements() { System.out.println(e.nextElement()); } selva
|
 |
 |
|
|
subject: enumeration and question
|
|
|