GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 72 of 502    Print  
Why java does not support Multiple Inheritance?
Why java is not pure Object Oriented?

  
Total Answers and Comments: 9 Last Update: November 03, 2009     Asked by: vas 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 02, 2005 23:41:45   #1  
pazhani subramaniam        

RE: Why java does not support Multiple Inheritance?

coz different classes may have different varible with same name that may be be contadicted and can cause confusions resulting in errors


 
Is this answer useful? Yes | No
February 09, 2006 04:13:52   #2  
vmshenoy Member Since: October 2005   Contribution: 508    

RE: Why java does not support Multiple Inheritance?

simply because java programmers found that this concept is not so useful and also the effort required to handle this is much.So in short v can say that its bad effects were more than its advantages.


 
Is this answer useful? Yes | No
February 21, 2006 10:27:58   #3  
gau_bhatnagar Member Since: December 2005   Contribution: 29    

RE: Why java does not support Multiple Inheritance?
Java absolutly support multiple inheritence in terms of Interface.We can extend one class only to avoid ambiguity problem.In interface we have to define the functions.So we don't get any ambiguity.In c++ it is big problem with multiple inheritence but in JAVA this thing is improved by introducing Interfaces
 
Is this answer useful? Yes | No
September 30, 2006 13:59:36   #4  
chanakya        

RE: Why java does not support Multiple Inheritance?
you have given the wrong ans same thing can happen with interfaces also but the ans below is correct
 
Is this answer useful? Yes | No
September 14, 2007 02:59:24   #5  
Basil        

RE: Why java does not support Multiple Inheritance?
Java is vast but implements simplicity avoiding ambiguity of methods and variables in multiple inheritence. This also saves memory and has simplicity.
 
Is this answer useful? Yes | No
March 11, 2008 07:00:25   #6  
sampra Member Since: February 2008   Contribution: 278    

RE: Why java does not support Multiple Inheritance?Why java is not pure Object Oriented?
java is not supporting multiple inhertice to avoid ambiguity sun guys has not allso this ...
java is supporting primitive that is non object data type so java cant called as purly object oriented language

 
Is this answer useful? Yes | No
September 01, 2008 03:04:16   #7  
srinu_griet Member Since: September 2008   Contribution: 1    

RE: Why java does not support Multiple Inheritance?Why java is not pure Object Oriented?
Java doesnt support multiple inheritance but Java classes support it.
 
Is this answer useful? Yes | No
September 02, 2008 07:25:51   #8  
jagadeesh_32 Member Since: July 2008   Contribution: 3    

RE: Why java does not support Multiple Inheritance?Why java is not pure Object Oriented?
Java does not support multiple inheritance directly but it supports multiple inheritence through interface.
Because when we extends more than one class JVM get some abigious problem.
i.e. JVM get confusion which method it will take.

Java is not totally pure because it has primitives. If you look at other languages like Ruby Smalltalk etc. they are purer because they don't distinguish between objects and primitives.

 
Is this answer useful? Yes | No
October 30, 2009 10:21:43   #9  
kuldeep0702 Member Since: October 2009   Contribution: 1    

RE: Why java does not support Multiple Inheritance?Why java is not pure Object Oriented?
Main reason is Diamond problem (ambiguity) during which JVM get the confusion that
is why Java does not support the multiple inheritance. Throw interface we use the multiple inheritance but it is the alternative method in
Java for getting the multiple inheritance because interface not part of inheritance it is a part of aggregation. Extends is part of inheritance.
Getting multiple inheritance firstly we extend and the implement the interface here extends and implement both
are different and process for same name function.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape