New Features in Java 8
Functional Interface
A functional interface is defined as an interface that must contain only one abstract method. It can have many static or default methods (with implementations), but there must be only one abstract method.
This abstract method indicates that it can perform a certain behavior, but the specific action is determined by the caller through overriding this abstract method. This can be achieved using anonymous inner classes or lambda expressions.
| |
Method Reference
| |
Function is also a functional interface, requiring its T apply(R) method to be overridden.