Tec*_*awi 0 java overloading interface
我很想知道如果一个类实现了两个或多个具有相似方法的接口,是否可以将其视为方法重载。如果不是,那么正确的术语是什么?
举个例子
public interface I1 {
int method1(String input);
}
public interface I2 {
void method1(int input);
}
public class C1 implements I1, I2 {
public int method1(String input){ return 0;}
public void method1(int input){}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
43 次 |
| 最近记录: |