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
Explain how to force the garbage collection in java.
What are user defined exceptions?
Differentiate between static and non-static methods in java.
Difference between Preemptive scheduling vs. Time slicing?
What is an accessor?
Can main() method in java can return any data?
What is function and method in java?
What does file separator do in java?
How to optimize the javac output?
Is char a method in java?
What is a java applet? What is an interface?
What is meant by class loader? How many types are there? When will we use them?
Is it possible to write a regular expression to check if string is a number?
Why is java architectural neutral?
What is singleton class and how can we make a class singleton?