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.