public class Overloading {
public static void main(String[] args) {
Overloading o = new Overloading();
o.display(null);
}
void display(String s) {
System.out.println("String method called");
}
void display(Object obj) {
System.out.println("Object method called");
}
}
它以“调用字符串方法”的形式给出输出。我需要解释为什么?