java supports syntactical multiple inheritance....java does not supports implementation of multiple inheritance...
some people says java supports multiple inheritance through interfaces ...but its not correct here the explanation:
inheritance ::
getting the properties from one class object to another class object..
Class A{}
Class B extends A {}
here object of class A getting the properties(methods/functions/ & data members/class variables)
why java does not supports multiple inheritance using classes:
Class A{} Class B{} Class C extends A,B{} X--this statement causes error because Class A getting object of object class from both sides A and B...
every java class by default extending Object of object class...and Object of object class is the root object means super class for all classes...
but here Class c having two super classes of object...so giving error...means java does not support multiple inheritance by using classes..
is java supports multiple inheritance using Interfaces::
because of this interface concept only few of us saying that java supports multiple inheritance....but its wrong..
here the explanation::
interface A{}
interface B{}
interface C implements A , B{}
(or) interface A{}
interface B{}
Class C implements A , B{}
here its look like multiple inheritance but .....
inheritance means getting the properties from one class object to another class object..
here in interface concept we are not at all getting any properties rather we are implementing the unimplemented methods of interface in class...
so inheritance and intefaces are quite opposite...
so finally java supports only syntax of multiple inheritance does not supports implementation of multiple inheritance....
inheritance is like debit and interface is like credit....but interface has its own importance in other concepts like server side programming...