java - Why Java doesn't implement MRO like Python
问题描述
As far as I know Java doesn't support multiple inheritance to safeguard from the diamond problem, ambiguity and maybe a few other reasons as well. But I see that Python handles the same problem with Method Resolution Order (MRO). Why doesn't Java incorporate something similar to support multiple inheritance?
解决方案
推荐阅读
- python - 我们可以在 XGBoost 中设置每个叶子的最小样本(就像在其他 GBM 算法中一样)?
- python - numba.core.errors.CompilerError:对象模式管道失败(步骤:对象模式前端)
- android - AlertDialog 上不需要的顶部填充
- java - 有人可以让我了解这个程序的流程吗?
- vue.js - 在 vuejs3 中使用 vuejs vee-validate 和组合 api 时编写最少代码的最佳实践
- python - 如何在 Python 中创建用户定义的类型断言?
- java - 如何在 JPA 和 Spring Boot 中正确构建和实现 HAS-A(组合)和 Hibernate
- python - JSON 注释错误“字符串索引必须是整数”
- c# - Azure 函数和持久化令牌缓存文件
- reactjs - 如何使用函数更改 chakra ui 元素上的道具?