When two methods in a class have the same name but different parameter types, it is known as method overloading. However, if a subclass overrides a method with a different return type, it is known as covariant method overriding. In Java, this is only possible if the return type of the subclass method is a subtype of the return type of the superclass method. For example, consider the following two classes:  public class A {
public Object m1() { ... }
}
public class B extends A {
@Override
public String m1() { ... } // return type is a subtype of Object
} In this example, the m1() method in class B covariantly overrides the m1() method in class A. This is allowed because the return type of the subclass method (String) is a subtype of the return type of the superclass method (Object). If the subclass had used a different return type (such as int), it would not have been considered covariant overriding, and an error would have been generated.