FULL PRODUCT VERSION :
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode)
1.6.0_11-b03
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
NumberFormat cf = NumberFormat.getCurrencyInstance(new Locale("en","IN"));
System.out.println("-->"+cf.format(10000000.00));
Prints:
-->Rs.10,000,000.00
Expected:
-->Rs.1,00,00,000.00
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java J
see source code
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
-->Rs.1,00,00,000.00
ACTUAL -
-->Rs.10,000,000.00
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.text.*;
import java.util.*;
public class J
{
public static void main(String[]ar)
{
NumberFormat cf = NumberFormat.getCurrencyInstance(new Locale("en","IN"));
System.out.println("-->"+cf.format(10000000.00));
}
}
---------- END SOURCE ----------
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode)
1.6.0_11-b03
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
NumberFormat cf = NumberFormat.getCurrencyInstance(new Locale("en","IN"));
System.out.println("-->"+cf.format(10000000.00));
Prints:
-->Rs.10,000,000.00
Expected:
-->Rs.1,00,00,000.00
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java J
see source code
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
-->Rs.1,00,00,000.00
ACTUAL -
-->Rs.10,000,000.00
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.text.*;
import java.util.*;
public class J
{
public static void main(String[]ar)
{
NumberFormat cf = NumberFormat.getCurrencyInstance(new Locale("en","IN"));
System.out.println("-->"+cf.format(10000000.00));
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-4997889 [Fmt-Nu] API: Number format anomaly for Indian(English) Locale
- Closed