Does Java support multiple Inheritance?
Answers were Sorted based on User's Feedback
Answer / santhosh
As per my knowledge java does not support multiple
inheritance through interfaces.Only the people copying the
syntax and saying like that.
my view is what is there in interfaces to inherit?
Because there is nothing to inherit from interfaces,all the
methods are by default public and all the variables are
public static final by default.
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / tewodros tesema
yes.actually java suports multiple inheritance
example:
class A{
int a=10;
}
class b extends A{
int b=3;
}
clss c extends b{
int c=a+b;
system.out("result"+c);
}
here calss b in herits a and clas c in herits b the it also
in herits a through b. also since java uses interfaces it
also suports multiple inheritance.
| Is This Answer Correct ? | 2 Yes | 29 No |
What does singleton mean in java?
Write a program to solve producer consumer problem in java?
What is the difference between Static and final?
What is difference between == and === in js?
Hi Friends, I am beginner in java. what i know about synchonized keyword is,If more that one 1 thread tries to access a particular resource we can lock the method using synchronized keyword. Then after that how the lock is released and how next thread access that.Please explain with example.
How to display all the prime numbers between 1 and 100
How do you do absolute value in java?
What is a singleton class in Java?
Can we convert list to set in java?
all are saying java doesn't support multiple inheritance but by default Object class is super class for all the user defined classes and we can extend atmost one class so each class can extend more than one class so java supports multiple inheritance?i am confused with this,pls any one explain me.
What are different types of inner classes ?
Can a final variable be null?