Hi guys, here is a confusing question from Glenn, Mitchell.
OCAJP Oracle Certified Associate
Java SE 8 Programmer Practice Exams (Kindle Locations 11362-11365). Enthuware. Kindle Edition. :
What should be the return type of the following method?
Select 1 option
A. int
B. long
C. double
D. float
Correct answer is C. Why? the casr applies only to the byte variable, that's OK, but why is the long automatically converted to double? is that legal? I mean they are 64bits all right, but still...