public class test {
public static void main(String[] args) throws Exception {
Temp temp = new Temp();
temp.test("1");
temp.test(null);
}
}
public class Temp {
public void test(Object a){
System.out.println("test Object");
}
public void test(String a){
System.out.println("test string");
}
}
为什么输出结果为
test Object
test Object