File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JAVA double exponent problem" Watch "JAVA double exponent problem" New topic

JAVA double exponent problem

Lim Cody

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

Output is:

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

Joined: Oct 30, 2001
Posts: 1970

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

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

But only in Java 5 or Java 6.
I agree. Here's the link:
subject: JAVA double exponent problem
It's not a secret anymore!