Příklad

public class ClassA implements Comparable<Integer> {
public int compareTo (Object o) {
// ...
}
}

Řešení
Pro metody compareTo použijte vždy standardní signaturu - public int compareTo(ObjectType o).
Ujistěte se, že ObjectType odpovídá typu identifikovanému v argumentu rozhraní Comparable.

public class ClassA implements Comparable<Integer> {
public int compareTo (Integer i) {
//...
}
}