Consider the following scenario.
List list = new ArrayList<>();
Now I added the String values for this li
Best way to do this is in java 8 is,
list.forEach(System.out::println);
Here are some useful links.
Java 8 Iterable.forEach() vs foreach loop
http://www.javaworld.com/article/2461744/java-language/java-language-iterating-over-collections-in-java-8.html
https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html