We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12844cb commit 7c01aa3Copy full SHA for 7c01aa3
java8Tutorials/src/main/java/java8/functionalInterface/SupplierInterfaceDemo.java
@@ -0,0 +1,13 @@
1
+package java8.functionalInterface;
2
+
3
+import java.util.Random;
4
+import java.util.function.Supplier;
5
6
+public class SupplierInterfaceDemo
7
+{
8
+ public static void main(String[] args)
9
+ {
10
+ Supplier<Integer> supplier=()->new Random().nextInt(20);
11
+ System.out.println(supplier.get());
12
+ }
13
+}
0 commit comments