We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 733127e commit 5a66215Copy full SHA for 5a66215
1 file changed
java8Tutorials/src/main/java/java8/functionalInterface/ForEachDemo2.java
@@ -0,0 +1,21 @@
1
+package java8.functionalInterface;
2
+
3
+import java.util.ArrayList;
4
+import java.util.List;
5
6
+public class ForEachDemo2
7
+{
8
+ public static void main(String[] args)
9
+ {
10
+ List<Integer> intItems = new ArrayList<>();
11
+ intItems.add(10);
12
+ intItems.add(50);
13
+ intItems.add(40);
14
+ intItems.add(30);
15
+ intItems.add(20);
16
17
+ //lambda
18
+ intItems.forEach(item->System.out.println(item));
19
20
+ }
21
+}
0 commit comments