public interface Iterator
An iterator over a collection. Iterator takes the place of Enumeration in the Java collections framework. Iterators differ from enumerations in two ways: Iterators allow the caller to remove elements from the underlying collection during the iteration with well-defined semantics.
Method names have been improved.
Since:
1.2
See Also:
Collection, ListIterator, Enumeration
An iterator over a collection. Iterator takes the place of Enumeration in the Java collections framework. Iterators differ from enumerations in two ways: Iterators allow the caller to remove elements from the underlying collection during the iteration with well-defined semantics.
Method names have been improved.
Since:
1.2
See Also:
Collection, ListIterator, Enumeration
解决方案 »
- linux初使用,安装官网最新jdk郁闷问题
- 已在该编译单元中定义Timer
- 求助,用java写类似俄罗斯方块游戏时碰到得问题
- 编译不报错 程序运行也没问题 但多了两个NOTE
- 关于applicationcontext.xml的问题
- 请问怎样拿到一个主机的mac地址!
- 请教大侠我在LINUX系统下面设置好了classpath之后javac可以正确运行而java却不能正确运行呢?
- Lend me a hand, how to set a timer in my program
- 请问那里有JB8.0的电子光盘教程卖呀?
- 奇怪,jb用的熟的都应该知道阿,怎么没人回答我?再问:Jb5中给一句代码设标记该如何设?在那里设?
- java中如何实现二维(多维)动态数组.谢谢
- 在浏览器中的Applet的源代码,放在那里了(Windows2000)。急,急急急
为什么用iterator()来遍历数据元素啊,直接用(比如ArrayList)ArrayList.get(index)不就行了?
请看。
http://www.onjava.com/lpt/a//onjava/2001/10/23/optimization.html
Iterator is designed for searching elements of Collection's classes.
Set has no index. You have to use iterator to get the elements.Suggestion, Don't try to translate the all terms to Chinese words. try to understand the purposes and behaviors of the terms. Sometime you cannot find an right Chinese words for them.