AP Computer Science Amediummcq1 pt

When is an overriding method called through a superclass reference?

A.when the object is actually a subclass
B.never
C.only for static methods
D.only at compile time

Explanation

Core Concept

Dynamic dispatch checks the runtime class.

Correct Answer

Awhen the object is actually a subclass

More Unit 9: Inheritance practice questions

Try a random question →

Practice more AP Computer Science A questions with full explanations

Practice Unit 9: Inheritance Questions →