A covariant return type of a method is one that can be replaced by a "narrower" type when the method is overridden in a subclass.
Let say class B is child of class A.
There is a get() method in class A as well as class B.
get() method of class A can return an instance
of A, and get() method of class B return an instance of B. Here
class B overrides get() method, but the return type is different.
Before Java 5, any method that overrides the method of parent class
would have same return type.
From Java 5 onwards, a child class can override a method of parent
class and the child class method can return an object that is child of
object return by parent class method.