Multiple choice technology

Which of the following statements are true?

  1. Methods cannot be overriden to be more private

  2. static methods cannot be overloaded

  3. private methods cannot be overloaded

  4. An overloaded method cannot throw exceptions not checked in the base class

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

Access modifiers can only be made more public in overrides, not more private (Liskov substitution principle would break). Static methods CAN be overloaded (different signatures). Private methods CAN be overloaded within the same class. Overloaded methods can declare any exceptions since they're not polymorphic - the restriction applies only to overrides.