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 |
Can you override static method in java?
Is 'sizeof' a keyword?
Is ++ operator is thread safe in java?
What does null mean in java?
What is use of super keyword in java?
Explain pass by reference and pass by value?
What do bitwise operators do?
What will happen when using pass by reference in java?
What is an object’s lock and which object’s have locks?
What is incompatible types in java?
What is bytecode verifier?
What will happen to the exception object after exception handling?