hi angela,
it is right that long can be converted into double or float between method calls. As u have double as the first param in the method call so u only have two options:
void
test(double a, double b, short c) //1
void test(double a, double b, double c) //2
out of which u have to select, as the last param of method is 3 i.e. of type int so the first one wouldn't be called though 3 falls within the range of short. NOw in //2 both long and int can be converted to double. Hence, //2 would be invoked.
HIH,
ashok.
Originally posted by Angela Narain:
[B]Below is a question from Barry Boone's exam :
I am not clear as to how the "long" will be
converted to "double"
Is implicit casting allowed in method calls.
i.e conversion as below from left to right are done automatically
I was under the impression that only byte,short , char
if found will be implicitly converted to int[/B]