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

Answers were Sorted based on User's Feedback



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

Answer / narmada nelluri

Java does not suuport multiple inheritence through classes
we can acheive the same with interfaces that means a class
can implement more than one interface at a time.

Is This Answer Correct ?    31 Yes 2 No

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

Answer / sachin ghare

It might be possible. Inherited both classes contain same method. And java by defualt polymorpic so at the time of compilation it will generate error.that's why. Interface contain astract methods so it Will manage stuff

Is This Answer Correct ?    6 Yes 2 No

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

Answer / 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

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

Answer / naseer

In java through interface we can acheive multiple inheritence.but not class. class can extend only one class

suppose if class A has one method m1() and class B has method m1() there are two diffrent implementaion whenver we can extends two class here some confusions ..A class has diffeent implementaion and B class has diffrent implementation.


suppose interface A has one method m1() and inteface B has one method m1() whenever interface extend two interfaces common method will be there we can override any method beacuase here implementaion is common for both methods


in classse implementaion is diffreent for both methods

Is This Answer Correct ?    1 Yes 0 No

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

Answer / sadiq

In Java class cannot extend more than one class,where as a
class can implement more than one interface.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Core Java Interview Questions

What are the different ways of creating thread?

0 Answers  


Is node a data type in java?

0 Answers  


How many statements can be created with one connection in jdbc?

4 Answers   Polaris,


Difference between array and arraylist.

23 Answers   Arise Solution, Banca Sella, iFocus, NIC, Sai Softech, Solartis, TCS, Verizon,


What is assembly used for?

0 Answers  






What is a map? What are the implementations of map?

0 Answers  


How does a cookie work in Servlets?

0 Answers  


What is java dot?

0 Answers  


Write a program to search a number in the given list of numbers.

0 Answers   Honeywell,


What is the use of parse function in java?

0 Answers  


Give reasons supporting that string is immutable.

0 Answers  


What is a parameter in simple terms?

0 Answers  


Categories