AP Computer Science Amediummcq1 pt
If Dog overrides speak and also defines bark, then an Animal reference to a Dog
A.can call speak but not bark
B.can call bark but not speak
C.can call both
D.can call neither
The reference type limits visible methods.
Acan call speak but not bark
Practice more AP Computer Science A questions with full explanations
Practice Unit 9: Inheritance Questions →