Suppose we have an argument list A with a set of argument types (A1, A2,…An) and two applicable method overloads Mp and Mq with parameter types (P1…Pn) and (Q1,…Qn), where if necessary the parameters have been converted to expanded form (see above).
Then, Mp is said to be a better method overload than Mq if both the following are true:
Suppose we have two conversions, from type S to types T1 and T2, then T1 is the better conversion when T1 and T2 are as follows:
T1 is: | And T2 is one of: |
same as S | anything |
binary-char |
|
binary-short |
|
binary-long |
|
binary-double |
|
Otherwise neither conversion is better.