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
What loop means?
Can we convert stringbuilder to string in java?
What do you mean by a JVM?
Explain creating threads by extending thread class ?
How many wrapper classes are there in java?
How can you read content from file in java?
What are the differences between wait() and sleep()?
How do you override a variable in java?
What environment variables do I need to set on my machine in order to be able to run java programs?
Are variables stored in ram?
How to sort array of 0 and 1 in java?
Can constructor be synchronized?
Is 0 a real number?
What is entry set in java?
Does constructor return any value?