aspose file tools*
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
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Enumeration" Watch "Enumeration" New topic


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.
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.
I agree. Here's the link:
subject: Enumeration
Similar Threads
error: as of release 1.5, 'enum' is a keyword
what is the use of Enumeration class?
Iterator vs Enumeration
Enumeration, LinkList
Java String Spliter, substring, string tokenizer