Covariant return type example in java In Java 5, we have feature called covariant return type. Prior to Java5, we could not change the return type…