dcsimg
Enumeration, Iterator.....
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   han_jian
Posted On:   Sunday, July 21, 2002 09:58 PM

Hi, I need a clarification here. In what situation I need to use Enumaration? So to Iterator and Collection? I find it quite confuse.
Reply is highly appreciated. Thank you

Re: Enumeration, Iterator.....

Posted By:   Ivo_Limmen  
Posted On:   Sunday, July 21, 2002 11:40 PM

The difference between the two is that the Enumerator is synchronized by default and therefor slower than the Iterator. You can have a synchronized Iterator if needed. The the collection framework documentation for more information.

Re: Enumeration, Iterator.....

Posted By:   Roger_Hand  
Posted On:   Sunday, July 21, 2002 10:23 PM

In general, Enumeration is older. When using anything in the Collection framework (ArrayList, Vector, etc.) you're probably better off using an Iterator if possible.
About | Sitemap | Contact