The Comparator interface has its own equals() method. Any class will get equals() by default through Object class. What is the need to have equal
equals()
equal
from the docs:
it is always safe not to override Object.equals(Object). However, overriding this method may, in some cases, improve performance by allowing programs to determine that two distinct comparators impose the same order.