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

What do the thread?class methods run() and start() do?

772


Explain the inheritance?

759


Can we pass null as argument in java?

687


What is a instance variable?

767


What does snprintf return?

759


Can list contain null in java?

868


What is the base class of all exception classes?

804


What is bufferedwriter?

736


What is the purpose of javac exe?

770


What are the approaches that you will follow for making a program very efficient?

831


Is java owned by oracle?

755


What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?

857


What is a null check?

748


What is the difference between final, finally and finalize()?

766


Which is bigger float or double?

746