Is java supports multiple inheritance? explain?

Answers were Sorted based on User's Feedback



Is java supports multiple inheritance? explain?..

Answer / kash

Two types of inheritance in Java:
Class inheritance : A sub class can have only one base class ( Single inheritance). Although the sub class can itself be a base class to another sub class ( Multi level inheritance).
Interface inheritance: interface allows multiple classes to implement abstract methods defined on it ( so supports multiple inheritance)

Is This Answer Correct ?    0 Yes 0 No

Is java supports multiple inheritance? explain?..

Answer / praveenkumar

yes java supports multiple inheritance but not directly.
By implementing single inheritance we can acheive multiple
inheritance.See for example

class A{

some method();

}
class B extends A
{


}

class C extends B
{


}
like tht we can acheive multiple inheritance.

Is This Answer Correct ?    3 Yes 18 No

Post New Answer

More Core Java Interview Questions

Explain purpose of sleep() method in java?

0 Answers  


Does java linked list allow duplicates?

0 Answers  


What is escape analysis algorithm in JVM and how garbage collection actually worked n how it transfer the objects from one kind of space to other?

0 Answers  


What are local variables?

0 Answers  


What are alternatives to java serialization?

0 Answers  


Which method must be implemented by all threads?

0 Answers  


how to create multithreaded program? Explain different ways of using thread? : Java thread

0 Answers  


What does null mean in java?

0 Answers  


What is primitive array?

0 Answers  


how to minimize the functionality to will not force garbage collector?

2 Answers  


How do you use final keywords and final variables in Java?

2 Answers  


why we use merge option in hybernate pls give a ex snippet

0 Answers   CoreObjects,


Categories