Multiple choice technology programming languages

The overriding method cant have a more restrictive access modifier than the method being overridden.

  1. True

  2. False

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

Overriding methods cannot be more restrictive than the methods they override. This maintains the Liskov Substitution Principle - if the parent method is public, the child must also be public (or more accessible, though 'more accessible than public' doesn't exist). Making it protected or private would break the contract.