Basics
Below is a Functional Interface defined in Java:
Java
x
1
// Standard Java interface
2
public interface Executor {
3
void execute(Runnable command);
4
}
Note, that an interface does not need to be annotated with
@FunctionalInterface
to be treated as one.