Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners why java does not support multiple inheritance
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


sachin
why java does not support multiple inheritance
4 Answer(s)      5 years and 2 months ago
Posted in : Java Beginners



Advertisement
View Answers

September 3, 2009 at 5:14 PM


Hi Friend,

Java does not support multiple inheritance directly but it supports multiple inheritance through interface.When we extends more than one class, JVM get some abigious problem and will get confused as which method it will take.It creates complexity.Therefore java does not support it directly.

Thanks






February 3, 2012 at 12:43 AM


suppose take one ex: Baby is a child class is extending from Cow class and Dog class, and both Cow and Dog classes are having the same method that is walk() . If Baby class calls walk() method, jvm raises the problems... So these types of problems may occure while working with MI. But these problems are avoided using Interfaces...

Thanks...

..........Kranthi(mail2kranthi91@gmail.com)



October 25, 2012 at 11:46 AM


Reading this site helped me understand a lot, also seems to be an issue with the diamond problem when multiple inheritance is allowed:



September 25, 2012 at 8:29 AM


as James Gosling said that some C++ features like this is purposefully removed to keep Java simple. Anohter reason is Diamon pattern problem. Why Java does not support multiple Inheritance



Related Tutorials/Questions & Answers:
why java does not support multiple inheritance - Java Beginners
why java does not support multiple inheritance  hello friend, i knows that multiple inheritance is not supported in JAVA but this program looks ok... not support multiple inheritance directly but it supports multiple inheritance
Does Java support multiple inheritance?
Does Java support multiple inheritance?  Hi, Does Java support multiple inheritance? thanks   hi, Please visit the following link: http://www.roseindia.net/java/language/inheritance.shtml Hope
Advertisements
Why does Java not support operator overloading?
Why does Java not support operator overloading?  Hi, Why does Java not support operator overloading? thanks
multiple inheritance - Java Beginners
multiple inheritance  Why java does not support Multiple Inheritance...)why java classes does not support Multiple Inheritance? JAVA CLASSES ONLY.... } That's why java classes does not support multiple inheritance.But java interfaces
multiple inheritance.
multiple inheritance.  hello, can java support multiple inheritance???   hi, java does not support multiple inheritance
Multiple Inheritance
and inconsistencies Java does not support Multiple Inheritance. Thanks...Multiple Inheritance  Why Java Doesn't have Multiple Inheritance It is Advantage or Disadvantage.........   Hi Friend, When we extends
multiple inheritance
multiple inheritance  why java doesn't support multiple inheritance? we can achieve this by using interface but not with classes? what is the main reason that java community implemented like
multiple inheritance - Java Beginners
multiple inheritance  can u implement one class to more than one interface
What is a pointer and does Java support pointers?
What is a pointer and does Java support pointers?   Hi, What is a pointer and does Java support pointers? Thanks   Hi, Pointer... to memory leaks and reliability issues hence Java doesn't support the usage of pointers
Multiple Inheritance Problem - Java Beginners
Multiple Inheritance Problem  Hello Friend why Multiple Inheritance is not supported by java???? one of the answer i got that if there are three methods i. void show() in 3 super-classes named as A,B,C and if i extends A,B,C
Multiple Inheritance
Multiple Inheritance  All are saying java doesn't support multiple inheritance but by default Object class is super class for all the user defined... class so java any how do multiple inheritance? Can you please explain
how can i achieve multiple inheritance in java without using inheritance ?
how can i achieve multiple inheritance in java without using inheritance ?  how can i achieve multiple inheritance in java without using inheritance
Does hibernate support polymorphism?
Does hibernate support polymorphism?  Hi, Does hibernate support polymorphism? thanks
Multiple inheritance using interface - Java Beginners
Multiple inheritance using interface  Hi, I understand.... But the use of the interface is when we use multiple inheritance with more than one... in multiple inheritance Thank you, Rajkanth  Hi Friend, Please
multiple inheritance
multiple inheritance  Class A extends Class B but Class A also inherit Super Class Object so it is multiple inheritence give reason in support of your answer
Why does Java provide both abstract class as well as interface
Why does Java provide both abstract class as well as interface  why does java have both abstract class as well as interface? what is the need or importance of having both
Concept of Inheritance in Java
. Multilevel inheritance can go up to any number of levels. Java does not support...Concept of Inheritance in Java Concept of Inheritance in Java is considered... class from parent class. Let's understand the concept of inheritance in Java
Object does not support proprty or method
Object does not support proprty or method  Hi I have been given some HTML code which works on a stand alone machine but when I open the page on a network machine it returns a error which say's Object does'nt support this property
multiple language support iPhone
multiple language support iPhone  Is it possible to create an application in iPhone that can support multiple languages.   Yes, iPhone/iPad applications support the multi language applications. To create your iPhone
Inheritance,Inheritance in Java,Java Inheritance
. Java does not support multiple inheritance but the multiple inheritance can be achieved by using the interface. In Java Multiple Inheritance can be achieved...();   } } Java does not support
Y No Multiple Inheriatance in Java - Java Beginners
, Why java doesn't support multiple inheritance.  Hi Multiple... into a single class is known as multiple inheritance. Java does not support... the interface. In Java Multiple Inheritance can be achieved through use of Interfaces
post method does not support this url
post method does not support this url  This is Get product servlet class of Shoping site example of Http Session. I want to add selected product.... but I am receiving one error that is post method does not supported by this url
In netbean jdk, it does not import the file,"java.nio.file.Paths". why?.
In netbean jdk, it does not import the file,"java.nio.file.Paths". why?.  it shows error file does not exist
Why does this code prints fAfA instead of fBfA ?
Why does this code prints fAfA instead of fBfA ?  class B { void f(){ System.out.print("fB");} B(){f(); } } public class A extends B...(String[] args) { new A(); }} Why does this code prints fAfA instead
Inheritance in java - Java Beginners
Inheritance in java  I want a example program using the concept of (single and multiple) inheritance.  Hi Friend, Please visit the following link: http://www.roseindia.net/java/language/inheritance.shtml Thanks
Java inheritance
Java inheritance   can the child access protected content of the parent if the child is in a different project   If you have considered different project as different package then the child cannot access the content
inheritance
inheritance  how does one implement inheritance in java
Inheritance in Java
of level. * Though Java does not support Multiple Inheritance it can be achieved... Inheritance in Java enhances the properties of the class, which means... of inheritance in Java: Simple Inheritance Multilevel Inheritance
Inheritance in java - Java Beginners
Inheritance in java  I want a example program using the concept of (simple and multiple) inheritance
Inheritance program in java
;); } } Multilevel Inheritance Java does not support Multiple Inheritance DIRECTLY...In this tutorial we will discuss examples of Simple Inheritance in Java and Multilevel Inheritance in Java. Inheritance is an OOPS (Object Oriented
java inheritance
java inheritance  problem with following code.... class Employee { int empno; String name; String edesig; Employee() { empno=0; } Employee(int eno,String ename,String ed) { empno=eno; name=ename
 

 

 

DMCA.com