Java – Functional Interfaces (Java 1.8+)
Functional Interfaces: An interface with a single abstract method. Used with Lambda Expressions.
Example:
@FunctionalInterface
interface Greeting {
void sayHello(String name);
}
Greeting greet = (name) -> System.out.println("Hello, " + name);
greet.sayHello("John");
No images available.