Polymorphism

AP Computer Science A· difficulty 4/5

Polymorphism in Java means

  • A

    Object can be referred to by superclass type; the actual method called depends on the dynamic type

    check_circle
  • B

    Method overloading

  • C

    Same name; different bodies

  • D

    Multiple inheritance allowed

Explanation

Dynamic dispatch: <code>Animal a = new Dog(); a.speak();</code> calls Dog.speak().

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

Related questions