Umang Kothari
Feb 23, 2017 · 1 min read

According to your example:

FirstFunctInterface<String> f = s -> s.length() > 10;

Interface definition should be like this:

@FunctionalInterface
public interface FirstFunctInterface<T> {
public boolean firstMethod(T t);
}

instead of:

@FunctionalInterface
public interface FirstFunctInterface<T> {
public void firstMethod(T t);
}

Please correct me if I am wrong.

Umang Kothari

Written by

Android Engineer @Bangalore