MCQ
Single Best Answer
Easy
QWhat is the command used to call the method named myMethod in the parent class from the child class?
Class myChildClass extends myParentBaseClass
{
Public void myMethod()
{
_____________();
~~~Body of new code here~~~
}
}
ID: #9379
Module 13: Classes
260 views
Question Info
#9379Q ID
EasyDifficulty
Module 13: ClassesTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option D
Explanation
Justification:
- Insert is not a keyword, but a method on tables. It is not used to call an override method, but to insert data into a table .
- Return is not a valid keyword used in inheritance scenarios.
- The void keyword is used before a method. This indicates that a given method does not return a value. The void keyword is already used before myMethod().
- Super() is the correct call to ensure that the method of the same name, “myMethod” is called.
Related Lesson: Class Inheritance
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic