1.

How many classes can be inherited by a single class in java?(a) Only 1(b) Only 27(c) Only 255(d) Only 1024The question was posed to me in an interview for job.I need to ask this question from Types of Inheritance in section Inheritance & its Types of Object Oriented Programming

Answer»

The CORRECT choice is (a) Only 1

Easy EXPLANATION - SINCE java doesn’t support multiple inheritance, it is not possible for a class to inherit more than 1 class in java. This is the same case in C# also.



Discussion

No Comment Found

Related InterviewSolutions