This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Originally posted by Steve Rodgers: I have a String (XML) that I cast to float . . . . Now I need to make that float a type of Float.
First a word on terminology. Casting is a specific operation in Java where you change the reference type from one class/interface to another using put "(class/interface)" in front of the reference. It does not affect the object to which the reference points. What you're talking about in both cases is conversion.
Now, to convert a float to a Float, you simply create a new Float object from the float primitive:
Joined: Jul 03, 2003
Thanks for answering so quickly. I read a little more after my posting about Float versus float, etc... I needed the refresher.