Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

foreach() java

List<String> list = List.of("a", "b", "c");
list.forEach(elt -> System.out.println(elt)) /* output: a
                                                        b
                                                        c  */
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #java
ADD COMMENT
Topic
Name
3+9 =