Posts

Showing posts from June, 2022

My Code Blocks

 Click below to read the Code Bank. CodeBank

Documentation for optional interface java 8

 Follow the below java doc for optional interface ------------------------------------------------------- Optional Java 8 #optional #java optional #java8 #java 8 #optional interface #optionalInterface

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