As per my understanding "A functional interface is an interface that has just one abstract method"
But when I looked into the source code of Comparator.class file, i can see two methods,
int compare(T o1, T o2);
boolean equals(Object obj);
Could you please explain how Comparator interface is functional interface?
How do we use Comparator in lambda expression?
Edit: I understand from some of the answers below, that those methods are coming from Object method. Then what is the method which comparator interface actually has.
How Compiler knows this method is from Object class and need to be overridden?