- A insert
- B return
- C void
- D super
- Share this MCQ
Answer:
D
Share this MCQ
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
Click me to Read more Question & Answer of Module 13: ClassesShare this MCQ