This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
The casting was not introduced until Java 5.0, and it implicitly calls xxxValue() in the background.
When you (implicitly or explicitly) cast a Float to a float (or Integer to int etc) the compiler calls floatValue() (intValue() etc). This will give a NullPointerException if the Float (Integer etc) is null.
When you (implicitly or explicitly) cast a float to a Float (or int to Integer etc) the compiler calls valueOf (which is available for all primitive types).