wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Enumeration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Enumeration" Watch "Enumeration" New topic
Author

Enumeration

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Could anyone be kind enough to elaborate on the concept of Enumeration?
Your help will be greatly appreciated.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
When I think of enumeration, I think of traversing the contents of a collection. Enumeration and Iteratation are an abstraction such that you don't have to worry about the collection's underlying structure. For instance, traversing a Vector is easy to manage because it's implemented as a dynamic array and, as such, you can use an index. But, to walk a linked list or a set, things are a bit different...
Using Java's enumeration/iteration abstraction, you can use a common interface to traverse various types of collections.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Enumeration
 
Similar Threads
Java String Spliter, substring, string tokenizer
error: as of release 1.5, 'enum' is a keyword
Enumeration, LinkList
Iterator vs Enumeration
what is the use of Enumeration class?