[ajug-members] Australia CurrencyFormat
Joe Sam Shirah
jshirah at attglobal.net
Tue Jun 8 16:26:37 EDT 2004
Hi Chandra,
I ran your code as the program below and got
$10,200.00
with both 1.4.2 and 1.5 beta 1. Same results with the interactive
JIBCurrencyGUI program from my Java Internationalization Basics tutorial at
devWorks. If that's really all of your code, about the only thing I can
think of is that maybe you're running an earlier version that used AUD
instead.
===============
import java.text.*;
import java.util.*;
public class xxx
{
public static void main(String[] args)
{
NumberFormat cc =
NumberFormat.getCurrencyInstance(
new Locale("en", "AU") );
System.out.println( cc.format( 10200 ) );
} // end main
} // end class xxx
===============
Joe Sam
Joe Sam Shirah - http://www.conceptgo.com
conceptGO - Consulting/Development/Outsourcing
Java Filter Forum: http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International? http://www.jguru.com/faq/I18N
Que Java400? http://www.jguru.com/faq/Java400
----- Original Message -----
From: "Chandra Polaku" <cpolaku at yahoo.com>
To: <ajug-members at ajug.org>
Sent: Tuesday, June 08, 2004 2:51 PM
Subject: [ajug-members] Australia CurrencyFormat
> Hi,
>
> I am using Locale.AU to format price of a car. It is
> returning me AUD10,200 instead of $10,200. Any ideas?
>
> NumberFormat cc = NumberFormat.getCurrencyInstance(new
> Locale("en", "AU");
> cc.format(10200);
>
> Thanks
> -Chandra
>
More information about the ajug-members
mailing list