I found that the following code compiles (Java 8), despite a wrong number of arguments and a usage of reserved keyword 'this'.
public interface Comparable<T> {
public int compareTo(T o);
}
public class Person implements Comparable<Person> {
@Override
public int compareTo(Person this, Person other) {
return 0;
}
}
What is the reason for such behavior? Any code examples are welcome.