zoukankan      html  css  js  c++  java
  • java 实例 货币格式

    import java.util.*;
    import java.text.*;
    
    public class Solution {
        
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            double payment = scanner.nextDouble();
            scanner.close();
             String us = NumberFormat.getCurrencyInstance(Locale.US).format(payment);
        String india = NumberFormat.getCurrencyInstance(new Locale("en","in")).format(payment);
        String china = NumberFormat.getCurrencyInstance(Locale.CHINA).format(payment);
        String france = NumberFormat.getCurrencyInstance(Locale.FRANCE).format(payment);
            // Write your code here.
            
            System.out.println("US: " + us);
            System.out.println("India: " + india);
            System.out.println("China: " + china);
            System.out.println("France: " + france);
        }
    }
  • 相关阅读:
    SQL手工注入方法
    wireshark常见分析
    JOY靶机
    GoldenEye-v1靶机
    homeless靶机
    注入
    DC-9靶机
    你哈
    数据库常用数据类型
    数据表的基本操作
  • 原文地址:https://www.cnblogs.com/Angella/p/6624273.html
Copyright © 2011-2022 走看看