Here you can find the source of parseBigDecimal(String number, BigDecimal defValue)
public static BigDecimal parseBigDecimal(String number, BigDecimal defValue)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { public static BigDecimal parseBigDecimal(String number, BigDecimal defValue) { try {//from w ww .jav a2s . c om if (number != null && !number.isEmpty()) return new BigDecimal(number); } catch (Exception e) { e.printStackTrace(); } return defValue; } }