I understand that a bunch of methods with body are added using default
keyword of Java 8. My question is where is this annotation useful? I see that only one abstract method is allowed to be added with such annotation. But Comparator has two abstract methods :
int compare(T o1, T o2);
boolean equals(Object obj);
Also , Please explain the use of this annotation? I see that its a runtime annotation, so what are its uses ?