This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes JAVA double exponent problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JAVA double exponent problem" Watch "JAVA double exponent problem" New topic
Author

JAVA double exponent problem

Lim Cody
Greenhorn

Joined: Jul 02, 2007
Posts: 6
double pre=(Double.valueOf("58900000"));
System.out.println(pre);

Output is:
5.89E7

May i know how to print output to "58900000" without exponent?
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
java.text.DecimalFormat


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 44048
    
  33
System.out.printf("%10.0f%n", pre);

But only in Java 5 or Java 6.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: JAVA double exponent problem
 
It's not a secret anymore!