1.

If multi-level inheritance is used, First class B inherits class A, then C inherits B and so on. Till how many classes can this go on?(a) Only till class C(b) Only till class J(c) Only till class Z(d) There is no limitThe question was posed to me in quiz.This intriguing question originated from Types of Inheritance in chapter Inheritance & its Types of Object Oriented Programming

Answer»

Right OPTION is (d) There is no limit

Easy explanation - In this case, there is no limit. All the classes going on like this will INHERIT the MEMBERS of base class, and hence the upper level inheritance won’t affect the number of classes that can go on INHERITING in this pattern.



Discussion

No Comment Found

Related InterviewSolutions