Java does not support multiple inheritance.
how interface helps in the same?

Answer Posted / sushila sonare

in java only one super class should be there. If we are
saying multiple inheritance there is more then one super
class and at time of object creation super(){super calling
statement} statement is invoked and control goes to super
class but if we are saying multiple inheritance then there
is more than one super class so JVM getting confused,
control goes to where. So avoiding this confusion only
single inheritance are allowed in JAVA you can use this
concepts in multiple levels.

In interface compiler is not keeping default constructor, so
there is no constructor chain. Thats why we can have
multiple interface at same level.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why java is not 100% object-oriented?

825


Why arraylist is not synchronized in java example?

464


Is Constructor possible in abstract class in java ?

583


What is difference between equal and == in java?

518


Difference between object instantiation and construction ?

579






What is string data?

549


how to open and edit XML file in Weblogic???

1544


Can we sort hashmap in java?

524


Why destructor is not used in java?

518


Is singleton a bad practice?

574


How an object is serialized in java?

523


What does 0 mean in boolean?

537


How is a structure different from array ?

577


Can we sort arraylist in java?

557


How does finally block differ from finalize() method?

581