1.

If a class contains 2 nested class and is being inherited by another class, will there be any multiple inheritance?(a) No, only single level inheritance is used(b) No, only multilevel inheritance is used(c) Yes, because 3 classes are involved(d) Yes, because more than 1 classes are being derivedI have been asked this question at a job interview.My question is from Multiple Inheritance topic in portion Inheritance & its Types of Object Oriented Programming

Answer»

The correct choice is (a) No, only SINGLE LEVEL inheritance is used

The best I can explain: When a class having NESTED classes is being derived into another class. It INDIRECTLY means a simple class is being inherited to another class. This is single level inheritance.



Discussion

No Comment Found

Related InterviewSolutions