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
Select the correct answer from above options
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)