why java does not support multiple inheritance
Answer Posted / smitha
Java supports multiple inheritence indirectly through the
use of interface. In case we are able to extend more than
one class then there would be a confusion of which method to
process in case both classes have same method name(Same
method signature also).
In case of using interfaces to support multiple inheritance
we escape this problem as we define the methods that are
needed only.
| Is This Answer Correct ? | 232 Yes | 54 No |
Post New Answer View All Answers
What if I write static public void instead of public static void in java?
Explain the difference between abstract classes and interfaces in java?
What is method in java ?
How do you add an element to a set in java?
Does importing a package imports its sub-packages as well in java?
What is a war file?
Can we have more than one package statement in source file ?
What is the difference between iterator and list iterator?
What is an immutable object?
Is it possible to instantiate the abstract class?
How do I print a “?
2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?
Explain the difference between jdk, jre, and jvm?
How to create a base64 decoder in java8?
How can we pass argument to a function by reference instead of pass by value?