Java 8 Function Interface
Java.Util.Function
------------------------
Java.Util.Function added in java 8. So let's have a closer look into it. To go through the documentation click the below link.
https://docs.oracle.com/javase/8/docs/api/java/util/function/package-summary.html
The 4 important topics are ,
1. Predicate
2. Consumer
3. Function
4. Supplier
A youtube example for better understanding is :
https://www.youtube.com/watch?v=Tapz6_T5oHY
Consumer :
-- two methods, accept(T t) and andThen()
** accept(T t) , returns void means no thing returned. It accepts only input.
**andThen executes two consumers one after another.
#java
#java8
#java 8
#java.util.function
#javaFunction
#java function
#java consumer
#java predicate
#java supplier
#java lambda expression
Comments
Post a Comment