Here you can find the source of getBigDecimalFrom(double value)
private static BigDecimal getBigDecimalFrom(double value)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { private static BigDecimal getBigDecimalFrom(double value) { return new BigDecimal(String.valueOf(value)); }//from ww w .j a v a 2 s.com }