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 difference between jdk, jre, and jvm?

578


What is difference between next () and nextline () in java?

544


What are the steps that are followed when two computers connect through tcp?

526


What is difference between array and vector?

545


what is function overloading in java?

705






What exactly is a .class file?

581


What is the purpose of a default constructor?

583


What is ascii code?

647


What is the difference between normal report & matrix report?

575


What is a boolean in java?

585


What are anonymous inner classes?

567


What is array sorting in java?

557


Why we cannot override static method?

567


Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1031


How does singleton class work?

533