why java does not support multiple inheritance
Answer Posted / vishwanath
java doesn't support multiple inheritance directly because it leads to overiding of methods when both extended class have a same method name. this will leads to ambiguity in executing. this problem can be solved using interface which works similar to the multiple inheritance but the methods are defined in the subsequent classes so it does not create any ambiguity.
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
List types of storage classes in java?
What is 32 bit float?
What is a heavyweight component?
what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent
Why do we declare a class static?
Is array dynamic in java?
What is a wrapper method?
What is java beans?
What is the arraylist in java?
What is difference between string and new string?
What is stored procedure. How do you create stored procedure ?
Is java a virus?
What is native method in java?
Is java a pure object oriented language?
1.IN CASE OF DYNAMIC METHOD DISPATCH WHY WE USE REFERENCE VARIABLE,WE CAN USE THE DIFFERENT DEFINED OBJECT DIRECTLY TO ACCESS THE DATA MEMBER AND MEMBER FUNCTION OF THAT RESPECTIVE CLASS?WHAT IS THE MAIN FUNCTION OF "REFERENCE VARIABLE" HERE?