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 |
please tell me what is wrapper class in java with example ?
What is methodological theory?
What checkbox method allows you to tell if a checkbox is checked?
To obtain design information about an object, which class in used?
What is meant by JVM? Is JVM platform independent or not?
How many types of syncronization?
What is Remote Interface ?
Write a method to check if input string is palindrome?
Does .length start 0 java?
What is anti pattern in java?
What are the basics of core java?
What do you mean by Hash Map and Hash Table?