How can I use two iterators to go through a collection?

Nils Kulk

Just get a separate iterator for each loop:

Collection l = ...;
for(Iterator i = l.iterator(); ...) {
   for(Iterator j = l.iterator();...) {
   }
}
About | Sitemap | Contact