Multiple Inheritance in java

前端 未结 8 1438
無奈伤痛
無奈伤痛 2020-11-27 21:27

Java is not allowing inheritance from multiple classes (still it allows inheritance from multiple interfaces.), I know it is very much inline with classic diamond problem. B

8条回答
  •  清歌不尽
    2020-11-27 21:57

    Java designers decided that. Multiple inheritance can be simulated by the use of interfaces.

提交回复
热议问题