I have following program with method overloading. Can someone please explain me the output of following program.
public class test {
public void display(Object obj)
{
System.out.println("object method");
System.out.println(obj);
}
public void display(String str)
{
System.out.println("String method");
System.out.println(str);
}
public static void main(String[] args) {
test t=new test();
t.display(null);
}
}