Class extending more than one class Java?

后端 未结 11 1562
执笔经年
执笔经年 2020-12-06 04:29

I know that a class can implement more than one interface, but is it possible to extend more than one class? For example I want my class to extend both TransformGroup<

11条回答
  •  时光说笑
    2020-12-06 05:13


    Assume B and C are overriding inherited method and their own implementation. Now D inherits both B & C using multiple inheritance. D should inherit the overridden method.The Question is which overridden method will be used? Will it be from B or C? Here we have an ambiguity. To exclude such situation multiple inheritance was not used in Java.

提交回复
热议问题