Granted, multiple interface inheritance would allow us to construct a corresponding set of interfaces, but the classes implementing these interfaces couldn't follow the structure directly.
就算多重接口继承允许我们构造对应的接口集,但是实现这些接口的类不能直接遵循该结构。
However, multiple inheritance being used only for interface implementation was thought to alleviate this problem somewhat.
不过,多重继承只能用在被认为可以减轻这一问题的接口实现中。
Offering both an interface and an abstract class is redundant, but I find it convenient: in most cases, I only need the abstract class, but the interface enables multiple inheritance.
同时提供接口和抽象类是多余的,但我发现这样很方便:在大多数情况下,我只需要抽象类,但接口支持多继承性。
应用推荐