package test;
import java.math.BigDecimal;
/**
* @ClassName: Precise
* @Description: 精确计算银行利息
* @author lubinsu lubinsu_gmail_com
* @date 2012-2-22 下午2:17:03
*
*/
public class Precise {
/**
* @Title: main
* @Description: 精确计算利息
* @param @param args
* @return void
* @throws
*/
public static void main(String[] args) {
BigDecimal capital = new BigDecimal("10000000");
BigDecimal interestRate = new BigDecimal("0.1");
double interest = capital.multiply(interestRate).doubleValue();
System.out.println(interest);
}
}
精确计算
最新推荐文章于 2019-11-01 21:36:19 发布