📜  Java 多接口 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:09.582000             🧑  作者: Mango

代码示例1
/Extending Multiple Interfaces
A Java class can only extend one parent class. Multiple inheritance is not allowed. Interfaces are not classes, however, and an interface can extend more than one parent interface.

The extends keyword is used once, and the parent interfaces are declared in a comma-separated list.

Example
public interface Hockey extends Sports, Event