I have written this java code
public interface Sorter {
public static <T extends Comparable<T>> void sort(T[] array);
}
and the compiler throws this error at me:
Sorter.java:7: error: missing method body, or declare abstract
public static <T extends Comparable<T>> void sort(T[] array);
^
1 error
By changing the semicolon to '{}' at the end of the method declaration, everything seems to be fine. But isn't this the way to define interfaces? What's the point of a body after all.