1234567891011121314151617181920212223 |
- package J20250717.demo03_interface02;
- /**
- * @author WanJl
- * @version 1.0
- * @title MyInter
- * @description 如果一个类实现两个接口,且两个接口具有相同名方法,那么只需要实现一次。
- * @create 2025/7/17
- */
- public class Demo01 implements MyInter01,MyInter02{
- @Override
- public void method() {
- }
- }
- interface MyInter01{
- void method();
- }
- interface MyInter02{
- void method();
- }
|