Functional Interface

Interfaces in Java which have only one abstract method.

In other (natively functional) languages like JavaScript, you can assign functions to variables. This was not possible in Java.

If an interface however had only one abstract method, and we assign a function to a reference of that interface, the language can automatically assign the function to the abstract method - thereby supporting assigning and passing the functions.


Backlinks