What is multiple inheritance & can we implement it in java?

Answer Posted / lavanya

Java Does Support Multiple inheritance through the usage of
intrface concept. multiple inheritence is one class
acquiring the features of more than one class.

Java can extend one class but can implement more than one
interface.

intreface is a class whose methods are declared but
functionality not defined. The implementing class has to
define that functionality.

Through the use of interfaces we can avoid the confusion of
which class to use in case two extended classes have same method

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does class forname work in java?

683


What are latest features introduced with java 8?

798


Can we declare a constructor as final?

881


How do you create a sop?

724


How objects are stored in java?

736


What does singleton mean in java?

702


What is the difference between quicksort & mergesort? When should they be used? What is their running time?

820


Explain illegalmonitorstateexception and when it will be thrown?

819


What is the difference between synchronized and synchronized block?

764


Should database connections be singleton?

741


What is string intern in java?

755


How do generics work?

699


Why string objects are immutable in java?

785


Is zero a positive integer?

757


What is command line used for?

812