Here you can find the source of getPercentageValue(BigDecimal price, double amount)
private static BigDecimal getPercentageValue(BigDecimal price, double amount)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { private static BigDecimal getPercentageValue(BigDecimal price, double amount) { return price.multiply(new BigDecimal(amount / 100)); }// w w w . jav a 2s . com }