why java does not support multiple inheritance
Answer Posted / k.mahesh
Java does not support multiple inheritance but this problem is solved through interfaces. Interfaces helps Java to achieve several advantages of multiple inheritances without the associated problems\. We can prevent some variables and methods from being accessed by a subclass by declaring them as private.
Always interface gives a template from which we can develop new classes. Interface gives the design part and implementation of the design we must do. Interface tells what to do, but not now how to do. Java supports multiple inheritance through interfaces so that we can take features of tow interfaces into our implementation file.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain different ways of creating a thread?
How do you sort a set in java?
What is broken and continue statement?
How can we make string upper case or lower case?
Explain tree set and its features?
What are the two types of java programming?
What is the string function?
what is method reference in java 8?
Can a class with private constructor be extended?
What are the types of literals?
What is ‘has a’’ relationship in java?
What are the advantages of exception handling?
How many characters is 16 bytes?
Can we use this () and super () in a method?
Explain about method local inner classes or local inner classes in java?