File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Programmer Certification (SCJP/OCPJP)
preserve double precision
Joined: Jun 17, 2004
Jul 21, 2005 00:42:00
I declared a variable double as
when I print it, I get as 5.0.I want 5.00.
Can some one help me how to preserve the precition
Thaks in advance
Joined: Mar 11, 2002
Jul 21, 2005 02:05:00
NumberFormat nf = new DecimalFormat("0.00"); System.out.println(nf.format(d));
Joined: Sep 24, 2003
Jul 21, 2005 02:59:00
Java Q&A (FAQ, Trivia)
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: preserve double precision
UBB code quote
Rotating buffered image
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013