How does multiple inheritance work in Java?


This question already has an answer here:

  • Java : If A extends B and B extends Object, is that multiple inheritance 10 answers

Class Object is the root of class hierarchy. Every class has Object as a superclass. So, if I am extending a API class, will it be like, multiple inheritance? Obviously, Java doesn't support multiple inheritance. How does it then work?

Superclass is not the same thing as parent class. You can only have one mother, but you have a much larger number of female ancestors.