I would like to clarify my understanding of @FunctionalInterface
a bit.
As far as I know, we can add @FunctionalInterface annotation on an interface that only has one abstract method (It can have multiple default and static methods though.
In Java 8, Comparator<T>
interface has been marked with @FunctionalInterface so it can be used in Lambda Expression but when I opened the definition, I could see 2 abstract class there
int compare(T o1, T o2);
and boolean equals(Object obj);
I would like to understand how it is possible to have more than 2 abstract methods in the functional interface and still not getting any error? Help me to clear my understandings on this.