Which produces the output:
int int long double
This probably isn't much of a surprise; the calls that use byte and the short arguments are implicitly widened to match the version of the go() method that takes an int. Of course, the call with the long uses the long version of go(), and finally, the call that uses a float is matched to the method that takes a double.
In every case, when an exact match isn't found, the JVM uses the method with the smallest argument that is wider than the parameter.--Chapter 3, K & B
In the quote above, arent the words
parameter and
arguments got interchanged. I think it should have been
"smallest parameter that is wider than the argument" [ December 09, 2008: Message edited by: Himalay Majumdar ]