@Parvathy its Integer not int. so null will be taken(by @JeslyVarghese's suggestion)
@JeslyVarghese if you are refering this
public static void method(Integer s) {
System.out.println("String impl int");
}
code wont compile:
"The method method(Object) is ambiguous for the type Test"