Java allowing multiple inheritance -
Java allowing multiple inheritance -
i confused regarding concept in multiple inheritance. have 3 classes a, b , c.
class { // ... } class b extends { // ... } class c extends b { // ... }
i know bad practice of multiple inheritance , read java allows multiple inheritance through interfaces. not getting error in above code. please can explain me clear illustration without using interface. thanks!!
this not multi-inheritance. each class has 1 direct super class. if illustration considered multi-inheritance, wouldn't able utilize extends
keyword @ all, since each class extends default object
class.
multi-inheritence
class c extends a,b {}
and that's illegal in java.
java inheritance
Comments
Post a Comment