Example

public class ClassA implements Compare {
public int compare (Object o) {
// ...
}
}

Solution
Always use the standard signature for the compare method - public int compare(Object o1, Object o2).

public class ClassA implements Compare {
public int compare (Object o1, Object o2) {
//...
}
}