Java examples for java.math:BigDecimal Convert
big Decimal To String
//package com.java2s; import java.math.BigDecimal; public class Main { public static void main(String[] argv) throws Exception { BigDecimal amount = new BigDecimal("1234"); System.out.println(bigDecimalToString(amount)); }/*from ww w . j a v a2 s.com*/ public static String bigDecimalToString(BigDecimal amount) { String strAmount = "$"; if (amount.signum() == -1) { strAmount += "(" + amount.abs().toPlainString() + ")"; } else { strAmount += amount.abs().toPlainString(); } return strAmount; } }