Functional interfaces can be instantiated from lambda expressions directly. If the only purpose of a class or a singleton object is to implement a
functional interface, that class or object is redundant and should be replaced with a lambda expression.
What is the potential impact?
Complexity
When an interface is declared functional, SAM conversion is enabled for that interface. This means that any lambda expression that matches
the interface’s single function’s signature can be converted into an instance of the interface without the need for an explicit class or singleton
object to implement the interface. This change makes the code more concise and easier to read.