Here you can find the source of formatYuan2Fen(double fee)
public static int formatYuan2Fen(double fee)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { public static int formatYuan2Fen(double fee) { BigDecimal _fee = new BigDecimal(Double.toString(fee)); return _fee.multiply(new BigDecimal("100")).setScale(0, BigDecimal.ROUND_HALF_EVEN).intValue(); }/* ww w . j a va 2 s . c o m*/ }