Here you can find the source of getMoneyString(double money)
public static String getMoneyString(double money)
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; import java.text.NumberFormat; public class Main { public static String getMoneyString(double money) { NumberFormat nf = NumberFormat.getInstance(); ((DecimalFormat) nf).applyPattern("#,000.00"); String moneyStr = nf.format(money); return "" + moneyStr; }//from w w w . ja va2s . co m }