J2SE - Enumeration vs Iterator
2011-12-11 19:58
369 查看
Both are used to traverse a sequence of elements.
>> Iterator is new while Enumeration is old.
>> Iterator take the place of Enumeration in Java collections framework.
>> Iterator iterates over a collection while Enumeration iterates over Vector, key and value of Hashtable.
>> Iterator allows to remove elements during the iteration while Enumeration is read only
>> Iterator improves the method names
>> Iterator is new while Enumeration is old.
>> Iterator take the place of Enumeration in Java collections framework.
>> Iterator iterates over a collection while Enumeration iterates over Vector, key and value of Hashtable.
>> Iterator allows to remove elements during the iteration while Enumeration is read only
>> Iterator improves the method names
相关文章推荐
- Iterator vs. Enumeration
- java提高篇(三十)-----Iterator,与enumeration的区别。
- Iterator迭代器-ListIterator-Enumeration枚举类接口的特点和区别
- Java学习笔记 07 Iterator和Enumeration的联系和区别
- java类集(List/Set/Map/Iterator)(Enumeration/Vector/Stack/Properties)
- The requested list key 'map' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or peopl .
- Internal Iterator vs. External Iterator
- Enumeration接口和Iterator接口的区别
- [转]使用Enumeration和Iterator遍历集合类
- Java技术——Iterator和Enumeration的不同
- 【Python】迭代器(iterator) vs 生成器(generator)
- Enumeration和iterator
- Iterator和Enumeration区别
- Difference between Enumeration and Iterator in Java
- Enumeration 与 Iterator
- 知识点干货—Enumeration和Iterator的对比
- 关于struts2的checkboxlist、select等标签发生could not be resolved as a collection/array/map/enumeration/iterator type异常的记录
- Java技术——Iterator和Enumeration的不同
- Enumeration与Iterator介绍
- Java 集合系列之 Iterator和Enumeration比较