1.

If 6 classes uses single level inheritance with pair classes (3 pairs), which inheritance will this be called?(a) Single(b) Multiple(c) Hierarchical(d) MultilevelThe question was posed to me during a job interview.Query is from Types of Inheritance in division Inheritance & its Types of Object Oriented Programming

Answer»

Right option is (a) Single

The EXPLANATION is: Here all the pairs are using single inheritance. And no DIFFERENT pairs are INHERITING same classes. Hence it can’t be called hybrid or multilevel inheritance. You can say the single inheritance is used 3 times in that program.



Discussion

No Comment Found

Related InterviewSolutions