What is a functional interface in Java?

What is a functional interface in Java?

Approach: Define interface with exactly one abstract method.

An interface that contains exactly one abstract method. They are used as the assignment target for lambda expressions and method references.

Follow-up: What is the @FunctionalInterface annotation for?

Key concepts: lambda expressions, abstract method.