How multipleInheritance is possible in java?

Answers were Sorted based on User's Feedback



How multipleInheritance is possible in java?..

Answer / shiva

java does nt support multiple interface by using interfaces
its support tis one

Is This Answer Correct ?    0 Yes 0 No

How multipleInheritance is possible in java?..

Answer / vishal

Yes...Gopi u r answer is right.... i am agree with u

Is This Answer Correct ?    0 Yes 0 No

How multipleInheritance is possible in java?..

Answer / srikanth

Multiple Inheritance is possible in java through interfaces only. Where as in C++ it is possible through classes also. Because in C++ there is one operator called scope Resolution operator, by this we can uniquely call one method of super classes. But we have no such operator in java, so it is not possible for a class to be inherited from multiple classes but possible with interfaces. For example,

class MyClass implements interface1,interface2....
{
// code
}
One more thing is, we can define our class from combination of interface and class also. But, combination should contain only one class and one or more interfaces. Ultimately class should be inherited from one class only.
class MyClass extends Class1 implements interface
{
//code
}

Is This Answer Correct ?    0 Yes 0 No

How multipleInheritance is possible in java?..

Answer / srikanth

yes possile but memory will be allocated multiple times

when you extend multple class so, they removed that
concept
a class

b class c class d class

e class
when you what extend a class from e class then all class
will be loaded into main memory which is waste

Is This Answer Correct ?    0 Yes 0 No

How multipleInheritance is possible in java?..

Answer / anurekha

in java multiple inheritance is possible using interface.

Is This Answer Correct ?    1 Yes 3 No

How multipleInheritance is possible in java?..

Answer / suneel

In Java multiple inheritance is not Possible....
Don't think that interface is for multiple inheritance ,most
of the book given wrong idea about - interface is for
multiple inheritance .

Is This Answer Correct ?    1 Yes 3 No

How multipleInheritance is possible in java?..

Answer / sidhu

Yes , Namarata U r answer is write.....!!
I am agree with this satements .

Is This Answer Correct ?    0 Yes 3 No

How multipleInheritance is possible in java?..

Answer / n d rao

yes, Namratha u r correct, i got u r point

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Core Java Interview Questions

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

6 Answers   Satyam,


what is the use of clone() in real time scenario?

2 Answers   Quinnox,


What is difference between “==” and equals()?

1 Answers   IBM,


How to prevent a field from serialization ?

2 Answers  


y cant i declare method like public final static show()

3 Answers  






Any one can explain how the inerface uses in java. give with example.

1 Answers   IBM,


What is the difference between break and continue statements?

0 Answers  


How OOPS concept is achieved in Java?

6 Answers   Cognizant, JPMorgan Chase, Xavient,


What is difference between compatible and incompatible changes in serialization?

1 Answers   Synechron,


Are floats faster than doubles?

0 Answers  


What is the USE of Null interfaces ??...if thers nothing inside these interfaces how are they used and WHy are they used ???? No 1 has given a proper description yet

1 Answers  


What is ordered map in java?

0 Answers  


Categories