dcsimg
Difference between Hashtable and Enumeration
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   RV_RamaKrishna
Posted On:   Wednesday, December 1, 2004 09:26 AM


What is the difference between and Hashtable and Enumeration?Where do we use each of this?Thankx in advance.

Re: Difference between Hashtable and Enumeration

Posted By:   Naveen_Verma  
Posted On:   Wednesday, December 1, 2004 09:12 PM

Hashtable: is used for Key-Value pair data structures. Use of Hashtable is Threadsafe and hence is little slower. The same work which a Hashtable does, can also be achived by Using Hashmap, but Hashmaps are not threadsafe but fast.

Enumeration: It is interface that is used to iterate over element by elemnt over the collection of the elements. You cannot remove the elements of a collection if u r using the Enumeration interface. The same work which a Enumeration does, can also be achieved by Using Iterator interface. Using Iterator interface, you can remove the elements of the collection.

I hope this satisfies you.
About | Sitemap | Contact