generic method lambda java

Java
public interface GenericFunctionalInterface<T> {
  public T genericMethod();
}

GenericFunctionalInterface<String> gfi = () -> {return "sss";};
Source

Also in Java: