Java 8 New Features
Functional Interface
The definition of a functional interface is that it 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 represents that it can perform some behavior, but what specifically it does is determined by the caller through overriding this abstract method. This can be accomplished through anonymous inner classes or lambda expressions.
| |
Method References
| |
Function is also a type of functional interface that requires overriding its T apply(R) method.