Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

difference between methods paseFloat and floatValue

807597May 17 2005 — edited May 17 2005
Given a number represented by a string value, what is the difference between the following two approaches to convert the string value into a float value.
float f = Float.parseFloat(string);
Float fWrap = Float.valueOf(string);
float f = fWrap.floatValue();
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2005
Added on May 17 2005
1 comment
186 views