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 are synchronized blocks in java?
What is difference overloading and overriding?
What is hashing principle in java?
Is string is a data type?
Why java Don't Support Multiple interitence
When try and catch block is used ?
System.out.println(101/14) what is the output? a)6 b)14 c)7.14 d)0
Can we declare the static variables and methods in an abstract class?
What is a cup of java?
What is this keyword used for?
How to create packages in java?
what are the high-level thread states? : Java thread