Java tutorial
//package com.java2s; import java.math.BigDecimal; import java.text.DecimalFormat; public class Main { public static String getMoneyDisplay(BigDecimal amount) { if (amount == null) { return "0.00"; } else { DecimalFormat df = new DecimalFormat("##.00"); return df.format(amount.setScale(2, BigDecimal.ROUND_DOWN)); } } }