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

解决方案 »

  1.   

    to skyyoung(路人甲)
    为什么用iterator()来遍历数据元素啊,直接用(比如ArrayList)ArrayList.get(index)不就行了?
      

  2.   

    效率问题。
    请看。
    http://www.onjava.com/lpt/a//onjava/2001/10/23/optimization.html
      

  3.   

    to skyyoung(路人甲) and hyhong_h(黄黄) and Patrick_DK(疾风摩郎), 
    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.