We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7dd580 commit b0d1aecCopy full SHA for b0d1aec
InternalizationCurrency.java
@@ -0,0 +1,18 @@
1
+// internationalalozimg of currency
2
+import java.text.NumberFormat;
3
+import java.util.*;
4
+public class InternalizationCurrency {
5
+
6
+static void printCurrency(Locale locale){
7
+ double dbl=10500.3245;
8
+ NumberFormat formatter=NumberFormat.getCurrencyInstance(locale);
9
+ String currency=formatter.format(dbl);
10
+ System.out.println(currency+" for the locale "+locale);
11
+}
12
13
+public static void main(String[] args) {
14
+ printCurrency(Locale.UK);
15
+ printCurrency(Locale.US);
16
+ printCurrency(Locale.FRANCE);
17
18
0 commit comments