Java BigDecimal(char[] in) Constructor

Syntax

BigDecimal(char[] in) constructor from BigDecimal has the following syntax.

public BigDecimal(char[] in)

Example

In the following code shows how to use BigDecimal.BigDecimal(char[] in) constructor.


import java.math.BigDecimal;
//  w  w  w.j a  v  a 2 s  .c o m
public class Main {

  public static void main(String[] args) {
    BigDecimal bg1 = new BigDecimal(new char[]{'1','2'});
    System.out.println(bg1);

  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.math »




BigDecimal
BigInteger