Hi Archu,
Wrapping source code examples in code blocks makes for a nicer easier to read output for forum posts.
Where is the reverse method? Do you mean the static method found in the
java.util.Collections class?
You can't call the static method reverse within the enhanced for loop as it returns void. It actually updates the loop passed in by the reference. Hence why I called reverse and then was able to use the list directly in the enhanced for loop.
You should get to know the classes and interfaces found in the
java.util.* package, as there are heaps and heaps of awesome stuff already implemented to help
Java developers.
Hope all this helps.