Here you can find the source of milliToDollar(BigDecimal val)
public static String milliToDollar(BigDecimal val)
//package com.java2s; import java.math.BigDecimal; public class Main { private final static BigDecimal THOUSAND = new BigDecimal(1000); public static String milliToDollar(BigDecimal val) { return milliToDollar(val, 0); }/*w w w.j a va 2s . c om*/ public static String milliToDollar(BigDecimal val, int scale) { return val.divide(THOUSAND, scale, BigDecimal.ROUND_HALF_UP).toPlainString(); } }