1public static void main(String[] args) {
2 Scanner scanner = new Scanner(System.in);
3 double payment = scanner.nextDouble();
4 scanner.close();
5 // Write your code here.
6 Locale.setDefault(new Locale("en","IN"));
7 String india = NumberFormat.getCurrencyInstance().format(payment);
8 Locale.setDefault(Locale.CHINA);
9 String china = NumberFormat.getCurrencyInstance().format(payment);
10 Locale.setDefault(Locale.US);
11 String us = NumberFormat.getCurrencyInstance().format(payment);
12 Locale.setDefault(Locale.FRANCE);
13 String france = NumberFormat.getCurrencyInstance().format(payment);
14 System.out.println("US: " + us);
15 System.out.println("India: " + india);
16 System.out.println("China: " + china);
17 System.out.println("France: " + france);
18 }
19
1double money = 100.1;
2NumberFormat formatter = NumberFormat.getCurrencyInstance();
3String moneyString = formatter.format(money);
4System.out.println(moneyString);