Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
AP Computer Science A/Unit 9: Inheritance
Start Practice TestPractice Test
About Exam
easy

Properties of Method Overriding

Mark
< Prev
Next >

Consider the following class definitions.

public class Parent {
    public String greet() {
        return "Hello";
    }
}

public class Child extends Parent {
    @Override
    public String greet() {
        return "Hi";
    }
}

All of the following statements about method overriding are true EXCEPT:

A

The @Override annotation helps catch errors in the method signature when overriding.

B

Method overriding enables polymorphism by allowing the subclass to provide a specialized implementation.

C

Overriding a method in a subclass can be achieved by simply changing the method’s parameter list.

D

An overridden method in the subclass must have the exact same name and parameter list as the method in the superclass.

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Not enough data yet to show leaderboard.

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy|