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 definition and declaration?

755


What is time complexity algorithm?

811


What is mean by encoding?

828


what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread

913


What are the files generated after using IDL to java compiler?

829


What is an empirical question?

780


What is the difference between menuitem and checkboxmenu item?

1095


What is data type in java?

709


Is a boolean 1 bit?

846


Can we use return in constructor?

702


What is the primitive type short?

811


What are synchronized methods ?

844


What is math exp in java?

799


How to perform merge sort in java?

822


What is meant by tab pans?

868