Covariant return type in java

11

Before Java 5.0, when you override a method, both parameters and return type must match exactly.In Java 5.0, it introduces a new facility called covariant return type. You can override a method with the same signature but returns a subclass of the object

Read this post on techie-knowledge.co.in


Ashutosh kumar

blogs from New Delhi