What is a covariant return type in Java method overriding?

Java Associate Hard

Java Associate — Hard

What is a covariant return type in Java method overriding?

Key points

  • Covariant return type: subtype in child method
  • Enhances flexibility in method overriding
  • Ensures compatibility with parent method's return type

Ready to go further?

Related questions