Supplier Functional Interface in Java
@FunctionalInterface public interface Supplier<T> { /** * Gets a result. * * @return a result */ T get(); } class Test { public static void main(String[] args) { Supplier<String> supplier = () -> “Java”; System.out.println(supplier.get()); } } Output: Java class User { private String name; private String username; private String membershipType; private String address; public…
Read More Supplier Functional Interface in Java