Hi,
Pls look at the following:
DecimalFormat format = new DecimalFormat("#,###.00");
System.out.println(format.format(1234.999)); // 1,235.00
I'm wondering, how to make it NOT round?
--
Thanks
John
Toronto
Roedy Green - 17 Mar 2006 03:37 GMT
>Pls look at the following:
>
[quoted text clipped - 3 lines]
>
>I'm wondering, how to make it NOT round?
I don't think you can change it. I would have to do it with pre or
post processing or rolling your own.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Oliver Wong - 17 Mar 2006 16:43 GMT
> Hi,
>
[quoted text clipped - 5 lines]
>
> I'm wondering, how to make it NOT round?
It HAS to round, because the number of digits in the number to represent
exceeds the number of digits in the formatting mask. Perhaps instead you
wanted to ask how to change the rounding method (e.g. round to zero, round
away from zero, round down, round up, round to even, round to nearest)?
- Oliver
Patricia Shanahan - 17 Mar 2006 16:45 GMT
> Hi,
>
[quoted text clipped - 10 lines]
> John
> Toronto
One technique is to convert to BigDecimal, "round" to the required scale
using the BigDecimal rounding mode you want, and then format that.
Patricia