Java BigDecimal Create createBigDecimal(String val)

Here you can find the source of createBigDecimal(String val)

Description

Convert a String to a BigDecimal.

License

Apache License

Parameter

Parameter Description
val a <code>String</code> to convert

Exception

Parameter Description
NumberFormatException if the value cannot be converted

Return

converted BigDecimal

Declaration

public static BigDecimal createBigDecimal(String val) 

Method Source Code

//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;
    }
}

Related

  1. bigDecimalValue(final Number number)
  2. bigDecimalValueOf(Number n)
  3. createBigDecimal(double v)
  4. createBigDecimal(final String value)
  5. createBigDecimal(Object value)
  6. getBdIgnoreNull(BigDecimal bigDecimalPara)
  7. getBigDecimal(BigDecimal bigDecimal)
  8. getBigDecimal(double value, int decimals)
  9. getBigDecimal(final String str, final int scale)