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
How to check if linked list contains loop in java?
How we can make copy of a java object?
Differentiate jar and war files?
When do we use synchronized blocks and advantages of using synchronized blocks?
What is regex in java?
Does java allow default arguments?
What is static and final keyword in java?
What must a class do to implement an interface in java programming?
What is meant by local variable and instance variable?
Does java set allow duplicates?
What is update method called?
What is a lock or purpose of locks in java?
What is a local class in java?
What does regex mean?
What is the basic of java?