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
What is meant by class loader? How many types are there? When will we use them?
Is finalize() similar to a destructor?
What is difference between adapter class and listener?
hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea
What are singleton services?
What’s meant by anonymous class?
Is java an open source?
What about static nested classes in java?
Explain about java sdk?
How do you create an array in java?
Why do we use predicate in java?
Can we inherit a class with private constructor?
What are java packages?
What is the difference between size and length in java?
How many return statement are allowed in a function?