This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
"Is it it not trying to convert float to long, are we not taking a float reference (f)and trying to assign it a long value,or am i mistaken, and its just a little badly worded? "
My understanding is that the type of a reference cannot ever change, once declared, so in this case f is and will always be a float and contain only float values, so 12L MUST be converted to a float in order to get stuffed into f.
So it seems, to me, that the Mock Test's verbiage of "widening conversion from long to float" is accurate.
SCJP 6 88%
skipping SCJD to work on passing SCWCD
Joined: Jul 23, 2008
Thanks, that eases things, yes your right, but I still think they could have worded it a little better in their description!