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 many bytes are a float?
What is Session reduplication and how its done?
What is the base class in java from which all classes are derived?
What is generics in java interview questions?
Difference between == and .equals() ?
How do you remove duplicates from an array in java?
What is the default value of the local variables?
What is this keyword in java?
Can list contain null in java?
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.
How do you declare a variable?
Can you call a method in a method?
Why does java not allow multiple public classes in a java file ?
What do you mean Abstraction in java?
What is assembly used for?