Android examples for java.lang:Double
Format monetary Value
import java.text.DecimalFormat; public class Main { /** String to money */ public static String monetaryValue(double money) { String str = new DecimalFormat("###,###,##0.00").format(money); str = String.format("%s%s", "c", str); return str;/*from w ww . ja v a 2s .c o m*/ } }