O'Reilly logo
  • Ojitha Kumanayaka thinks this is interesting:

In Java 1.4 and earlier, one method can override another only if the argument and return types match exactly. In Java 5, a method can override another if the argument types match exactly and the return type of the overriding method is a subtype of the return type of the other method.

From

Cover of Java Generics and Collections

Note

covariant overriding