A double[]
is an Object
too, and when choosing which constructor (or method), Java will choose the one with the most specific parameter type that still matches. Because null
will match any parameter type, the most specific type matches, and that is double[]
here.
It's not confusing once you know this rule, but this will occur when two or more overloaded constructors (or two or more overloaded methods) differ only in that one of the parameter types in one of them is a subclass of the corresponding parameter in another.
The JLS, Section 15.12.2.5 states how Java chooses the method/constructor to invoke when multiple overloaded methods/constructors match:
The Java programming language uses the rule that the most specific method is chosen.
and
The informal intuition is that one method is more specific than another if any invocation handled by the first method could be passed on to the other one without a compile-time error.