I have the following code
import java.util.List;
public class Sample {
public static void main(String[] args) {
test(null);
}
static void test(List<Object> a){
System.out.println("List of Object");
}
static void test(Object a){
System.out.println("Object");
}
}
and I got following output in console
List of Object
Why doesn't this call test(Object a)
? Can you some one explain how it took "List as" null
?