1.

Single level inheritance supports _____________ inheritance.(a) Runtime(b) Compile time(c) Multiple inheritance(d) Language independencyThis question was addressed to me in an internship interview.This interesting question is from Single Level Inheritance topic in section Inheritance & its Types of Object Oriented Programming

Answer»

The correct option is (a) Runtime

To explain I WOULD SAY: The runtime inheritance is done when object of a class is created to call a method. At runtime the FUNCTION is searched if it is in class of object. If not, it will SEARCH in its parent classes and hierarchy for that method.



Discussion

No Comment Found

Related InterviewSolutions