2 Answers - Sort by: Date | Rating
The question whether Java supports multiple inheritance or not can simply be answered as both yes and no. In fact, Java separates implementation inheritance from interface inheritance. Interface inheritance deals with the contract to which a class adheres. On the other hand, implementation inheritance deals with both the reuse of the code and the contract to which a class adheres.
Java only permits the multiple inheritances of interfaces and the single inheritances of implementation. It is different from other programming languages such as C++ where both the concepts are intermingled, which makes them unnecessary complicated. Java is a simpler programming language than other programming languages such as C++. This is because in Java, the concepts of interface inheritances and implementation inheritances are not intermingled. Since the Java programming language does not support multiple inheritance, it allows a class to extend more than one class of bases. Multiple interfaces are similar to multiple inheritances.
Java only permits the multiple inheritances of interfaces and the single inheritances of implementation. It is different from other programming languages such as C++ where both the concepts are intermingled, which makes them unnecessary complicated. Java is a simpler programming language than other programming languages such as C++. This is because in Java, the concepts of interface inheritances and implementation inheritances are not intermingled. Since the Java programming language does not support multiple inheritance, it allows a class to extend more than one class of bases. Multiple interfaces are similar to multiple inheritances.
0
0
Hi... As we all know we can implement multiple interfaces in java,but only single inheritance.as i think that is because in interfaces there is not a method body so no problem occurs when implementing more than one interfaces,but when inhering from another class problems occur when using multiple inheritance since there can be a method body in the super classes(if we didnt override and just call a metode of super class if that method defined in more than one super classes there will be a problem)
0
0
Guest
answered 6 months ago
- How To Make A Java Program That Will Ask The User To Input A Number And Display All The Even Number And The Sum Of All Even Numbers Based On The Inputted/ Given Numbers?
- Is A Static Variable An Instance?
- How To Compile And Run Java Package?
- What Does Literati-on Mean?
- What Is Abstract Class In Details?
- What Is Meant By Remote Method Invocation In Java?
- What Is Meant By Package In Java?
- What Is Meant By Servlet In Java?
- When Was Java Released?
- What Is Latest Technologies In Java?
- Write A Program Using Do…..while Loop To Calculate And Print The First M Fibonacci Numbers?
- What Is The Difference Between Reference &instance Variable?
- Why Java Is Slow?
- What Is The Drawback Of Ms Access?
- What Is Replaced In Place Of Pointers In Java?
- What Replaces Pointers In Java?
- How Many Types We Create Object In Java?
- I Signed Up Promo Code 505124 For 12 Months My Bill Said For 6 Months Who Fix This Error?
- What Is The Expansion Of Java?
- How To Do An Atm Java Program?
- How To Create A Diamond Using Asterisks In Java?
- How Do You Use Abstraction In A Sentence?
- Why Do I Need Java?
- Why Does Java Provide The Ability To Call From A Java Program Native Methods That Are Written In, Say, C Or C++? Provide An Example Of A Situation In Which A Native Method Is Useful.
- What Is A Role Of Object In Java?
- Why Isn't Multiple Inheritance Used In Java?
- Is Multiple Inheritance Possible In Java Or Not?
- Is Multiple Inheritance Possible In Java Language Or Not?
- Why Does Java Use Interfaces Instead Of Multiple Inheritance?
- Can You Tell Me The Reasons For Not Using Multiple Inheritance In Java?
- W Is It That Hy Java Doesn't Support Multiple Inheritance Directly?
- Why Java Is Not Supported Pointers?
- What Is Pointer In C And The Can Be Supported In Java?
- Which Image File Is Not Supported By Java?
- What Is Inheritance In Java?
- Is Multiple Inheritance Possible In C#? If It Is Then How?
- How Does Inheritance Help Us To Create A New Class In Java?
- What Is Implementation Inheritance In Java? Please Give An Example Program Also.

New Comment - Comments are editable for 5 min.