class Test {
public void method(Object o) {
System.out.println("Object");
}
public void method(Test s) {
System.out.println("Test");
}
public static void main(String as[]) {
Test ob = new Test();
ob.method(null);
}
}
Q. Why is the output "test" ? How null
is getting passed over here and why?