Here you can find the source of string2BigDecimal(String s)
public static BigDecimal string2BigDecimal(String s)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { public static BigDecimal string2BigDecimal(String s) { try {// ww w. j av a2 s .c o m if (s == null || "".equals(s.trim())) { return null; } else { return new BigDecimal(s); } } catch (Exception e) { return null; } } }