A method is said to be maximally specific for a method invocation if it is applicable and accessible and there is no other applicable and accessible method that is more specific.
If there is exactly one maximally specific method, then it is in fact the most specific method; it is necessarily more specific than any other method that is applicable and accessible.
It is possible that no method is the most specific, because there are two or more maximally specific method declarations. It's not possible to identify a most-specific method from among the applicable methods. In this case, we say that the method invocation is ambiguous, and a compile-time error occurs.
The precise definition of the most specific property is as follows. Let m be a name and suppose that there are two declarations of methods named m, each having n parameters. Suppose that one declaration appears within a class or interface T and that the types of the parameters are T1, . . . , Tn; suppose moreover that the other declaration appears within a class or interface U and that the types of the parameters are U1, . . . , Un . Then the method m declared in T is more specific than the method m declared in U if and only if both of the following are true:
T can be converted to U by method invocation conversion. Tj can be converted to Uj by method invocation conversion, for all j from 1 to n.
A slight change to your program,
And an ambiguity error results: javac Confusing.java Confusing.java:14: reference to Confusing is ambiguous, both method Confusing(java.lang.Double) in Confusing and method Confusing(double...) in Confusing match new Confusing(null); ^ 1 error
SCJP 5.0 | SCWCD 1.4 <br /> <br />If you don't know where you are going, any road will take you there!