Here you can find the source of calculateMonthInterest(Float interestRate, BigDecimal investmoney)
public static BigDecimal calculateMonthInterest(Float interestRate, BigDecimal investmoney)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; import java.math.RoundingMode; public class Main { public static BigDecimal calculateMonthInterest(Float interestRate, BigDecimal investmoney) { return investmoney.multiply(new BigDecimal(Float.toString(interestRate))) .multiply(BigDecimal.ONE.divide(new BigDecimal(12), 10, RoundingMode.HALF_UP)); }/* w ww . j av a 2 s . com*/ }