why java does not support mulitple inheritance directly?
Answers were Sorted based on User's Feedback
Answer / kranthi kumar adari.
Java doesnot support multiple inheritance bcoz it leads to
ambiguity when two base classes are having same function
signature.
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / sumit pal singh
java Doesn't Support multiple inheritance.when two super classes have same variable name and same method name .then subclass confused from which class variable and method will be executed.due to this ambiguity is produced and java is a simple programming language not produce any confusion to developer.so multiple inheritance is restricted in java.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ravikiran
Because we cann't extend more than one class at once
| Is This Answer Correct ? | 4 Yes | 10 No |
What is array initialization in java?
ublic class Java_Coding_Samples { public static void JavaHungr(NumberFormatException ae){ System.out.println("integer"); } public static void JavaHungry(Exception e){ System.out.println("string"); } public static void JavaHungry(ArithmeticException ae){ System.out.println("object"); } public static void main(String[] args) { JavaHungry(null); }
What is the public method modifier?
diff b/w sleep(1000) and wait(1000)?
Explain what access modifiers can be used for variables?
What is the difference between the font and fontmetrics classes in java programming?
What happens if main method is not static?
What is sortedset in java?
Explain the selection sort algorithm and state its time complexity?
Explain about oops concepts.
0 Answers Aditi Placement Service,
What is loop in java?
Can interface be private in java?