Here you can find the source of subtractPercent(BigDecimal price, double amount)
public static BigDecimal subtractPercent(BigDecimal price, double amount)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { public static BigDecimal subtractPercent(BigDecimal price, double amount) { return price.subtract(getPercentageValue(price, amount)); }//from w w w . j a v a2s . c o m private static BigDecimal getPercentageValue(BigDecimal price, double amount) { return price.multiply(new BigDecimal(amount / 100)); } }