Java examples for java.math:BigDecimal Format
big Decimal Format
//package com.java2s; import java.math.BigDecimal; public class Main { public static BigDecimal bigDecimalFormat(String strNum, int scale, int mode) { BigDecimal bigDecimal = new BigDecimal(strNum); BigDecimal newBigDecimal = bigDecimal.setScale(scale, mode); return newBigDecimal; }/*w ww . ja va2s.c o m*/ }