current amount in UK format using Locale.UK and pattern #,##0.00 - 450,500.00 but i need it in Indian format
Asked
Active
Viewed 5,253 times
-1
-
1possibly duplicate http://stackoverflow.com/questions/10826850/java-string-format-with-currency-symbol – shakthydoss Oct 27 '13 at 06:41
-
2http://stackoverflow.com/questions/5379231/displaying-currency-in-indian-numbering-format – shakthydoss Oct 27 '13 at 06:43
-
Possible duplicate of [Displaying Currency in Indian Numbering Format](http://stackoverflow.com/questions/5379231/displaying-currency-in-indian-numbering-format) – Alex K Jan 17 '17 at 11:13
2 Answers
2
try ICU4J available from Maven central repo
Format format = com.ibm.icu.text.NumberFormat.getNumberInstance(new Locale("en", "IN"));
String str = format.format(100000000);
output
10,00,00,000

Evgeniy Dorofeev
- 133,369
- 30
- 199
- 275
0
if you dont want to you third party libraries you can try this code as well
Format df = new DecimalFormat("###,###,000.00");
int val = 10000000;
System.out.println(df.format(val));

Muhammad Ahmed
- 25
- 3