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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the private method modifier?

811


Is a boolean 1 bit?

835


What is object data type?

780


Which variables are stored in stack?

665


Can singleton class be cloned?

798


Can It is possible to synchronize the constructor of a Java Class?

814


Which list is sorted in java?

766


What is the use of conditional statement?

743


What are advantages of exception handling in java?

794


what is enumset?

797


Can we use string in switch case in java?

807


Can a constructor be protected?

785


Why does java have different data types for integers and floating-point values?

770


Why deletion in linkedlist is fast than arraylist?

771


What is array command?

806