Tuesday, September 7, 2010

Java Programming: Indian currency format


locale: en_IN

Locale locale = new Locale("en", "IN", "");

NumberFormat format = NumberFormat.getCurrencyInstance(locale);

format.format(-100.24) produces the following string: "-Rs.100.24"

while format.format(100.24) creates this: "Rs.100.24 Rs."


No comments:

Post a Comment