why java does not support multiple inheritance
Answer Posted / lalit sonje
There is another form of inheritance called as multiple
inheritance. This is not supported by java. The authors of
the java language took a design decision to compromise
multiple inheritance with interfaces, the specifics of this
decision may be covered in other sources. Practically,
multiple inheritances is difficult because of the
ambiguities, it can be created when a class inherits from
two super classes with the same method signature.
But there is a workaround for this problem. Java allows us
to achieve partial multiple inheritance using interfaces. A
class can implement any number of interfaces and provide
implementations for them and achieve partial multiple
inheritance.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is computer compiler?
What isan abstract class and when do you use it?
Why array is used in java?
what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????
Is string a class?
Give differences between Quicksort &Mergesort. When should these sorts be used andwhat is their running time in java?
Can we create constructor in abstract class ?
What is meant by 'bit masking' in java?
What are the two types of streams offered by java 8?
What is the difference between an if statement and a switch statement?
What is the difference between post and put?
Does chrome use java?
What is arraylist e?
What is the default size of set in java?
What is stream api in java8?