Overriding Methods

AP Computer Science A· difficulty 4/5

"Overloading" and "Overriding" differ in

  • A

    Overloading: same name, different parameters in same class. Overriding: subclass replaces parent's method

    check_circle
  • B

    Overloading is in subclass; overriding is in same class

  • C

    Both involve inheritance

  • D

    Both are the same

Explanation

Easy mnemonic: overload = compile-time, override = runtime.

Want 10 more like this — adaptive to your weak spots?

Related questions