/ Published in: Java

This code uses the new Java 5 foreach loop to iterate through every element of a list. It avoids the need to declare an iterator.
Expand |
Embed | Plain Text
Comments

You need to login to post a comment.
cpjobling on 03/01/07
1 person have marked this snippet as a favorite
This code uses the new Java 5 foreach loop to iterate through every element of a list. It avoids the need to declare an iterator.
You need to login to post a comment.
can I use this code to iterate a two dimensional list and sort it alphabetically? And will it work on Java 8? Guess once done with working on this web site will try it myself but thought would ask you. Maybe you have some other interesting ideas on how I can do it.