Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
double d = 4.24
When i convert this into a String I lose the precision Value and it returns back 4.2.
I know we could achieve this using Decimal format .... but is there any other way of achieving this.

will print
2.34
2.34
How are you converting double to String and back?
In addition, if you are looking for precise decimal values, you should use BigDecimal instead of double.