| Author |
Collections
|
vuthlarhi donald
Ranch Hand
Joined: Jul 31, 2006
Posts: 76
|
|
|
what are the tree ways of traversing a list...I know that you can use the for each loop, iterator. what's the other one. and the advantages/disadvantages of this methods of transversing a list
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32694
|
|
You can use an ordinary for loop, but the for-each loop is much neater. Read the API documentation for the RandomAccess tagging interface to find out which is better.
|
 |
 |
|
|
subject: Collections
|
|
|