Is java supports multiple inheritance? explain?
Answers were Sorted based on User's Feedback
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 |
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 |
What modifiers are used with an inner class which is a member of an outerclass?
What is immutable state?
How many bits is a float?
When we can access the static data member without creating the object what is the need of the object in java.
5 Answers Airhub, ssinformatics,
How to disable caching on back button of the browser?
how to write a program for sending mails between client and server
What is a ?
Superclass of exception
What are different exception types exceptions available in java ?
What do you mean by aggregation?
What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?
Can we change the value of static variable?