1.

How many base classes can a single class inherit in java?(a) 1(b) 2(c) 3(d) As many as required

Answer» Right option is (a) 1

Explanation: In java, multiple inheritance is not supported, which leads to the fact that a class can have only 1 parent class if inheritance is used. Only if interfaces are used then the class can implement more than one base class.


Discussion

No Comment Found

Related InterviewSolutions