- default methods do not count
- static methods do not count
- methods from the Object class do not count
A Lambda Expression is an instance of a functional interface.
public interface Predicate<T> { boolean test(T t); }Implementation would be:
Predicate<String> predicate = s -> s.length() < 20;System.out.println(predicate.test("Hello world!"));//expicite way of using it