JDK8 Functional Interfaces
Conceptually, a functional interface has exactly
one abstract method.
- https://docs.oracle.com/javase/8/docs/api/java/
lang/FunctionalInterface.html
Slide 10
Slide 10 text
public interface Supplier {
T get();
}
Slide 11
Slide 11 text
Supplier supply() {
return (() -> {
return new Foo();
});
}
lambda expression
parameters list
body
Slide 12
Slide 12 text
Supplier supply() {
return (() -> new Foo());
}
implicit return
where have we seen
that before?