FunctionalInterface with two non-default methods

65 views Asked by At

I was looking at Comparator<T> interface from java.util and I saw the fact that is annotated with @FunctionalInterface.

Can someone please explain me why a compile error is not present since two non default methods are present in the interface? The methods are:

int compare(T o1, T o2);

and

boolean equals(Object obj);
0

There are 0 answers