Here you can find the source of createBigDecimal(String val)
Convert a String
to a BigDecimal
.
Parameter | Description |
---|---|
val | a <code>String</code> to convert |
Parameter | Description |
---|---|
NumberFormatException | if the value cannot be converted |
BigDecimal
public static BigDecimal createBigDecimal(String val)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { /**/* ww w . ja va 2 s . c o m*/ * <p>Convert a <code>String</code> to a <code>BigDecimal</code>.</p> * * @param val a <code>String</code> to convert * @return converted <code>BigDecimal</code> * @throws NumberFormatException if the value cannot be converted */ public static BigDecimal createBigDecimal(String val) { BigDecimal bd = new BigDecimal(val); return bd; } }