Covariant Return Type in Java

In this tutorial, we’ll discuss covariant return type in Java which was added in Java 5. Method overriding in Java is said to be covariant with respect to return type which means that the return type is allowed to vary in the same direction as the subclass. What is covariant…

Continue reading