We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ba3977 commit 16c73dcCopy full SHA for 16c73dc
README.md
@@ -40,3 +40,17 @@ By using @FunctionalInterface annotation
40
3. Implementation of method must be static
41
42
43
+#### There are few functional interfaces namely Consumer, Supplier, Predicate provided by Java 8.
44
+
45
+### Consumer
46
47
+- A Consumer is a functional interface that accepts a single input and returns no output.
48
+- Consumer interface has two methods:
49
50
+```
51
+void accept(T t);
52
+default Consumer<T> andThen(Consumer<? super T> after);
53
54
+- The ```accept``` method is the Single Abstract Method (SAM) which accepts a single argument of type T.
55
+- ```andThen``` is a default method used for composition.
56
0 commit comments