pramod talekar wrote:This question was asked in an interview and the interviewer said that the compiler will throw an error due to ambiguity. 
The ambiguity will come only when you call the method with a
null literal.
Please note that it has to be the literal. Even passing a null String reference will enable compiler to select the right method (and hence it will not report any problem).
Lastly, sorry for being too finicky (programmer's brain's OCD), but "compiler will throw an error" does not make sense at all. Compiler can only report compilation problems. It can not throw any Error or Exception.