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 |
Why only one Class is public in one file? Explain in details. Thanks in Advance.
Is static a keyword in java?
What are the advantages and disadvantages of reference counting in garbage collection?
Is assembly language a low level language?
If you do not want your class to be inherited by any other class. What would you do?
Garbage collection in java?
what is difference between perfom() & excute() ?
Can a double value be cast to a byte?
explain autoboxing in java?
Explain the difference between Unicast and Multicast objects?
what is jms? features of jms
Explain Basics of OOP Language in java