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


Please Help Members By Posting Answers For Below Questions

List types of storage classes in java?

827


What is 32 bit float?

760


What is a heavyweight component?

757


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

1946


Why do we declare a class static?

748


Is array dynamic in java?

682


What is a wrapper method?

761


What is java beans?

768


What is the arraylist in java?

747


What is difference between string and new string?

749


What is stored procedure. How do you create stored procedure ?

1737


Is java a virus?

722


What is native method in java?

784


Is java a pure object oriented language?

731


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?

4390