“ This interface does the opposite of the Consumer interface. So it doesn’t take anything as input but returns a value. “

Supplier has only one method which name is “ T get() ”

@FunctionalInterface
public interface Supplier<T> {
T get();
}

And here is some examples about using

///#…

--

--