JAVA 一个接口多个同名不同参数的方法 在写在工厂类时怎么写?菜鸟刚学习JAVA,求高手指教???

如题所述

第1个回答  推荐于2016-12-01
public interface testComm {
public void test(String arg);
public void test(String arg, String arg2);
public void test(String arg, String arg2, String arg3);
public int test(int arg);
public void test(int arg, String arg2);
public void test(int arg, String arg2, String arg3);
}本回答被提问者和网友采纳
第2个回答  2012-07-12
就是简单的重载就行,只是不要写实现而已
第3个回答  2012-07-12
写着就行,有错,ide会报错
相似回答