Java Tutorials


Java Functional Interfaces

    Java 8 introduced Lambda Expressions, These expressions depends on Functional Interfaces. A Functional Interface is an Interface which has only one Abstract method, and also it can have static and default methods. It can optionally be decorated with @FunctionalInterface Annotation.

Earlier java(i.e before JDK8) , an interfaces can be implemented using class/anonymous class. An anonymous class is a class which has no class name, and can implement interface methods.

Functional interfaces can be used as a return type for lambda expressions and method references.

Java Framework Built-in Predicate Functional Interfaces.

Predicate Interfaces
--------------------
Predicate
BiPredicate
IntPredicate
LongPredicate
DoublePredicate

ADS