Multiple choice technology programming languages

Overriding method can change the return type regardless of overridden method.

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Java, an overriding method can change the return type only if it's a covariant return type (a subtype of the original return type). It cannot arbitrarily change to any return type regardless of the overridden method's return type.