Java Currency Code Get getCurrencyNationNumber(double num, int dec)

Here you can find the source of getCurrencyNationNumber(double num, int dec)

Description

get Currency Nation Number

License

Open Source License

Declaration

public static String getCurrencyNationNumber(double num, int dec) 

Method Source Code


//package com.java2s;

import java.text.NumberFormat;
import java.util.Locale;

public class Main {

    public static String getCurrencyNationNumber(double num, int dec) {
        NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.CHINA);
        nf.setMaximumFractionDigits(dec);
        return nf.format(num);
    }/*  w  w w . j  a v a 2 s  .  c o  m*/
}

Related

  1. countryCodesForCurrency(String c)
  2. currencyFromCode(String currency)
  3. getAvaiableCurrencySymbols()
  4. getCurrency(final String code)
  5. getCurrencyDisplay(Object amount)
  6. getCurrencyString(long value)
  7. getDefaultCurrency()
  8. getInstance(String currencyCode)