Which is the new method introduced in java 8 to iterate over a collection?
(a) for (String i : StringList)
(b) foreach (String i : StringList)
(c) StringList.forEach()
(d) List.for()
The question was posed to me in final exam.
This interesting question is from Java 8 Features topic in chapter Autoboxing & Miscellaneous of Java