× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



When I run the following in WDSC and netbeans I get the result I would
expect. However when I run it on the i5 JVM 1.4 I get an unexpected result.
I'm probably missing something really obvious, any help would be
appreciated.



public static void main(String[] args) {



BigDecimal num = new BigDecimal("123456789987654321123456789987");

DecimalFormat df = new DecimalFormat();

df.setMaximumFractionDigits(99);

df.setMaximumIntegerDigits(99);

df.setMinimumFractionDigits(3);

df.setMinimumIntegerDigits(3);



df.setGroupingUsed(true);

df.setGroupingSize(3);



String s = df.format(num);



System.out.println(s);





}



Result in WDSC and Netbeans s =
"123,456,789,987,654,321,123,456,789,987.000"



Result when run on i5 s = "123,456,789,987,654,321,123,300,000,000.000"



Thanks for taking a look.



Neill


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.