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 moose likes Struts and the fly likes parseFloat() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "parseFloat()" Watch "parseFloat()" New topic


Sreejith kayappuram
Ranch Hand

Joined: Jun 24, 2008
Posts: 35
i want to parse a long float value.

result = > 999999999999999

But if value is


result = > 10000000000000000

is there any other way i can parse this long value ?

Joe Ess

Joined: Oct 29, 2001
Posts: 9154

You should be aware that floating-point numbers on computers are approximations, not exact values. This JDC Article has examples to illustrate the problem and a solution in Java.

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: parseFloat()
jQuery in Action, 3rd edition