:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Java Related >> Java J2EE >> Core Java


 Core Java interview questions  Core Java Interview Questions (1720)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (43)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (195)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (145)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
why java does not support multiple inheritance
 Question Submitted By :: Stalin
I also faced this Question!!     Rank Answer Posted By  
  Re: why java does not support multiple inheritance
# 1
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 Correct ?    292 Yes 83 No
  Re: why java does not support multiple inheritance
# 2
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 ?    225 Yes 50 No
  Re: why java does not support multiple inheritance
# 3
java defenetly support multiple can be done
by the keyword called does not support the
multilevel inheritance
Is This Answer Correct ?    26 Yes 454 No
  Re: why java does not support multiple inheritance
# 4
Java was designed without multiple inheritance.Java
interfaces solves most problems that are commonly solved
using multiple inheritance just simulates inheritance .

Kalaivani , Kishore don't misguide others unless your
absolute with your answers.
Is This Answer Correct ?    40 Yes 72 No
  Re: why java does not support multiple inheritance
# 5
To say why java doesn't support inheritance directly like c++
should be the diamond problem faced by c++,

(Diamond problem is an ambiguity that arises when two
classes B and C inherit from A, and class D inherits from
both B and C. If a method in D calls a method defined in A
(and does not override it), and B and C have overridden that
method differently, then via which class does it inherit: B,
or C?)
Is This Answer Correct ?    196 Yes 18 No
  Re: why java does not support multiple inheritance
# 6
Because in java a class doesn't extend more than one class 
Is This Answer Correct ?    22 Yes 95 No
  Re: why java does not support multiple inheritance
# 7
Basically multiple inheritance is useful only in
polymorphism, so in java it can be done by interfaces, so
that java doesn't need to provide multiple inheritance
using extends keyword.
Is This Answer Correct ?    22 Yes 34 No
Devesh Dashora
  Re: why java does not support multiple inheritance
# 8
java does not supports multiple inheritence at all.but it
supports similar feature interface.Which removes the
ambiguity problem(Deadly Diamonds Of Death) and complexity
of multiple inheritence.Although interface is not the part
of inheritence because inheirtence is achieved in java
through extends keyword only.Interface is the part of
aggregation not inheritence.
Is This Answer Correct ?    44 Yes 12 No
  Re: why java does not support multiple inheritance
# 9
Multiple inheritance in Java is not allowed directly simply
because Java has another concept of Interfaces that replace
the ambiguity of this problem in other OOP languages such
as C++.
Is This Answer Correct ?    9 Yes 23 No
Ouali International
  Re: why java does not support multiple inheritance
# 10
Multiple inheritance means derive class from multiple
classes but java can't extend multiple classes. it can
extend one class but multiple interfaces. so create
multiple interfaces n then implement it.

Java have such fzacility to avoid ambiguty.
Thank u
Is This Answer Correct ?    34 Yes 17 No

Other Core Java Interview Questions
  Question Asked @ Answers
String is an immutable object. Then how can the following code be justified. String s1 = ?ABC?; String s1 = s1+?XYZ?; s.o.p(s1); The output is ABCXYZ, which is the value of s1 ? Flextronics 6
What is stop(), suspend(), resume() method?   3
what is difference between length and length()?   7
What is the difference between Checked and Unchecked exception? Give some examples Ness-Technologies 2
What is the immediate parent class of the Applet class?   1
why operator overloading is removed in java?   1
if the memory capacity is 700 presently occupied by process is 690. then another process request space(40) how this situation handled in java. Wipro 4
What is casting? BMC 3
what is Remote Reference Layer ?   1
what is the replacement method of stop() of thread TCS 8
What is the life cycle of an Applet ?   1
Is Java is 100% pure OOPS? Explain? ANZ 26
For more Core Java Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::