Tricky Interview Question | Why Java Doesn't Support Multiple Inheritance

preview_player
Показать описание
This video explains why Java doesn't support multiple inheritance using classes and how we can achieve the same using interfaces.

Checkout the Playlists:
👉 Java Tutorial For Beginners:

👉 Design Patterns in Java

👉 Tricky Java Interview Questions

👉 Important Java Programs for Interview:

👉 How to Avoid Common Mistakes as a Java Beginner

👉 Interview Coding Challenges

👉 MySQL Tutorial For Beginners:

👉 What is Agile | Understanding Agile Software Development Process:

👉 Selenium with Java Tutorial For Beginners:

LIKE | SHARE | SUBSCRIBE 😊

👇👇👇
Follow me on

Photo used in Thumbnail is licensed under
Рекомендации по теме
Комментарии
Автор

All your reasons are applicable to C++, however C++ has multiple inheritance.

You should have mentioned that you can extend multiple interfaces. Starting with Java 8 default methods introduce the ambiguity you explain in the video.

The ral reason is that: there is no multiple class inheritance in Java because the JLS does not allow it.

PeterVerhas
Автор

But Python, has multiple inheritance. In your case python use first parent method. I think it's will be a good idea to implement the same multiple inheritance in java

krjaken
visit shbcf.ru