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 is deserialization and how do we do deserialization?
What does method mean?
What is the use of parse function in java?
Can inner class extend any class?
Can we define a package statement after the import statement in java?
How long will it take to learn java?
what is the volatile modifier for? : Java thread
what is meant by encapsulation?
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread
How you can force the garbage collection?
How many bits does a boolean take?
How applets will communicate with each other?