posted 17 years ago
Hi Saumya,
I don't know if I've really understood your question, but I could give you this example:
A Hashtable collection is indexed by keys and IS NOT ordered or "iteratable" (don't know if this term really exists) by itself. Therefore, to iterate through a Hashtable (traverse its elements) you may call the method elements() of the class Hashtable, and this method will return a Enumeration object.
Now, with a Enumeration object, you are able to traverse the elements of your Hashtable collection just using the methods of that interface, that are: nextElement() and hasMoreElements().
Hope I've helped you!