Tom Reilly wrote:In B, you are attempting to override the super class method so you cannot change the return type.
Not 100% true. You can change the return type to a sub type; that's why C is allowed. This is called covariant return, and has been introduced in
Java 5.0. You can't change it to a super type (Object) or something totally unrelated (int).