Does Java support multiple Inheritance?

Answer Posted / ramakrishna

JAVA omits many rarely used, poorly understood,
confusing features of C++ that in our experience bring more
grief than benefit. This primarily consists of operator
overloading (although it does have method overloading),
multiple inheritance, and extensive automatic coercions.

Who better than Dr. James Gosling is qualified to make a
comment on this. This paragraph gives us an overview and he
touches this topic of not supporting multiple-inheritance.
Java does not support multiple inheritance

First lets nail this point. This itself is a point of
discussion, whether java supports multiple inheritance or
not. Some say, it supports using interface. No. There is no
support for multiple inheritance in java. If you do not
believe my words, read the above paragraph again and those
are words of the father of Java.

This story of supporting multiple inheritance using
interface is what we developers cooked up. Interface gives
flexibility than concrete classes and we have option to
implement multiple interface using single class. This is by
agreement we are adhering to two blueprints to create a class.

This is trying to get closer to multiple inheritance. What
we do is implement multiple interface, here we are not
extending (inheriting) anything. The implementing class is
the one that is going to add the properties and behavior. It
is not getting the implementation free from the parent
classes. I would simply say, there is no support for
multiple inheritance in java.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many digits is int32?

540


What happens when heap memory is full?

528


What does flagged out mean?

576


Define the term string pool?

590


What does three dots mean in java?

656






Is treeset sorted in java?

588


What are the basics of core java?

554


Why is sizeof not a function?

553


What does index mean in java?

544


What is a percentage sign called?

621


Why java doesn’t support multiple inheritances?

588


What is the disadvantage of synchronization?

567


Explain the difference between serializable and externalizable in java?

543


Explain when classnotfoundexception will be raised ?

569


How is the marker interface used in Java?

614