Supplier Functional Interface

less than 1 minute read

Supplier

public interface Supplier<T> {
    T get();
}
//Static method Reference
Supplier<LocalDate> s1 = LocalDate::now;
//Lambda Expression
Supplier<LocalDate> s2 = () -> LocalDate.now();

Tags:

Categories:

Updated: