Here you can find the source of getCurrencyNationNumber(double num, int dec)
public static String getCurrencyNationNumber(double num, int dec)
//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*/ }