I am using below code to check which overloaded method will be called. Why do I see String : null in the output instead of ambiguity or Object : null?
public class Employee {
public void display(Object o){
System.out.println("Object : "+ o);
}
public void display(String s){
System.out.println("String : " + s);
}
public static void main(String[] args) {
Employee employee = new Employee();
employee.display(null);
}
}