According to Kathy Sierra
SCJP 6, when a class has overloaded methods, during method matching, the JVM will select the method with the smallest argument that is wider than the parameter.
In SCENARIO A, Integer and Double both qualify because none of them is wider than the other and they are both wider than the parameter i.e.
null, so the compiler complains
The constructor TestClass(Integer) is ambiguous.
In SCENARIO B, the compiler is happy because Object is wider than Double. The second constructor runs because the JVM will select the method with the smallest argument that is wider than the parameter.