Home » JAVA Programming » Java Basic » Question
  1. Which is the new method introduced in java 8 to iterate over a collection?
    1. StringList.forEach()
    2. List.for()
    3. foreach (String i : StringList)
    4. for (String i : StringList)
    5. None of these
Correct Option: A

Traversing through forEach method of Iterable with anonymous class.



Your comments will be displayed only after manual approval.