I want to convert a simple Java function to a lambda 8 function without any parameter, and then call it:
public int getMissing() {
return 0;
}
how to convert above to java8 lambda format?
I want to convert a simple Java function to a lambda 8 function without any parameter, and then call it:
public int getMissing() {
return 0;
}
how to convert above to java8 lambda format?
Define the following:
public interface Function<T> {
public T apply();
}
With this, you can do something like
methodThatAcceptsFunction(() -> { getMissing(); });