In the first instance you're attempting to pass null to the chk method which is an acceptable value to both. So there is no way to determine which type you are referring to. But in your second instance the type String is a descendant of Object so String is selected. The same would hold true if you were to run your first example with List rather than Attributes in this case it would always call Vector.