2008年7月1日火曜日

The Collection Interface

Use Iterator instead of the for-each construct when you need to:

* Remove the current element. The for-each construct hides the iterator, so you cannot call remove. Therefore, the for-each construct is not usable for filtering.
* Iterate over multiple collections in parallel.


http://java.sun.com/docs/books/tutorial/collections/interfaces/collection.html

0 件のコメント: