B
Bart Rider
Hi there,
I just want to have a confirmation. I have two
variables like this:
int i = 10;
double d = 10.1;
Now I test whether d is greater and do such a thing:
if (i<d)
greater_double();
else
smaller_or_equal_double();
My question is the following. Does Java internally
converts the int(eger) i to double before comparison
(as I assume it does) or might there be circumstances
where it did not in such a case?
Best regards,
Bart
I just want to have a confirmation. I have two
variables like this:
int i = 10;
double d = 10.1;
Now I test whether d is greater and do such a thing:
if (i<d)
greater_double();
else
smaller_or_equal_double();
My question is the following. Does Java internally
converts the int(eger) i to double before comparison
(as I assume it does) or might there be circumstances
where it did not in such a case?
Best regards,
Bart