wood burning stoves
The moose likes Servlets and the fly likes Formating a number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Formating a number" Watch "Formating a number" New topic

Formating a number

Joey Alencar
Ranch Hand

Joined: Jun 26, 2001
Posts: 43
I have one float variable that when I try to show its content, something like this is showed: 7.5E7. How can I put this number in the normal format (like 75000000.00)?
Thanks very much for any help.
Hardy Chou

Joined: Jun 27, 2001
Posts: 27
use DecimalFormat class
Yogen Vadnere
Ranch Hand

Joined: Sep 20, 2001
Posts: 58
u can try this ,
formatDouble = 7500000000000.00 ;
NumberFormat converter = NumberFormat.getInstance() ;

Yogen Vadnere
Joey Alencar
Ranch Hand

Joined: Jun 26, 2001
Posts: 43
Thank you very much.
I agree. Here's the link: http://aspose.com/file-tools
subject: Formating a number
It's not a secret anymore!