Java tutorial
//package com.java2s; import java.math.BigDecimal; import java.math.RoundingMode; public class Main { public static BigDecimal amtToBigDecimal(String bcdAmt) { BigDecimal bigDecimal = new BigDecimal(bcdAmt); bigDecimal.setScale(2, RoundingMode.HALF_UP); bigDecimal = bigDecimal.divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP); return bigDecimal; } }