Java Chooses the most specific methods based on the inheritance hierarchy!!! In your example which has null as a parameter it will call the method with Object as a parameter rather than String because Object class comes top in the inheritance hierarchy compared to Strings...i.e. class String extends Object...
WRONG! Like John mentioned, here the method with String parameter is more specific than the one with Object parameter.
In general terms, if the parameters of Method A are valid in Method B, but not vice versa, Method B is said to be "more specific" than Method A.
No, here Method A is more specific, which in this example is test(String).
JLS explains the most specific method as this:
"One method declaration is more specific than another if any invocation handled by the first method could be passed on to the other one without a compile-time type error."
Thus, here you could call the test(Object) within test(String), but not vice versa, hence test(String) is more specific.
Hope I explained it properly...
Vidhya.