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 is prime number in java?
How many times finalize method will be invoked? Who invokes finalize() method in java?
What are methods?
What is api in java?
Is nullpointerexception checked or unchecked?
What is the difference between int and integer in java?
Why are data types important?
What is java virtual machine and how it is considered in context of java’s platform independent feature?
How to add menushortcut to menu item?
Can you start a thread twice in Java?
Is 64bit faster than 32 bit?
What is the format specifier?
what is enumset?
Differentiate between a class and an object.
How to overcome the exception object reference not set to an instance of object?