Why null goes to method Which Accepts The String
class Test {
public static void test(String s)
{
System.out.println("In String");
}
public static void test(Object o) {
System.out.println("In Object");
}
public static void main(String args[]) {
test(null);
}
}
I expect The Result To be In Object as Strings Are Usually Passed in("")