I understand that a bunch of body methods have been added using the defaultJava 8 keyword . My question is, where is this annotation useful? I see that only one abstract method can be added with such annotation. But the 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 this is a run-time annotation, so what uses it?
source
share