Archive for October 26th, 2007
cast Double to String in java
Double to String casting …
if you want to display its String in number format (like this ###,###,##0.00) do not use these lines …
Double sk = 12300000000.35;
System.out.println(sk.toString());
System.out.println(String.valueOf(sk));
they would result like these ones:
1.230000000035E10
1.230000000035E10
use this one instead.
Double sk = 12300000000.35;
[...]
