Java BigDecimal Add addBigDec(BigDecimal b1, BigDecimal b2)

Here you can find the source of addBigDec(BigDecimal b1, BigDecimal b2)

Description

add Big Dec

License

Open Source License

Declaration

public static BigDecimal addBigDec(BigDecimal b1, BigDecimal b2) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.math.BigDecimal;

public class Main {

    public static BigDecimal addBigDec(BigDecimal b1, BigDecimal b2) {
        return b1.add(b2);
    }//from w  ww  .ja v  a 2  s  . co  m

    public static double add(double d1, double d2) {
        BigDecimal b1 = new BigDecimal(d1);
        BigDecimal b2 = new BigDecimal(d2);
        return b1.add(b2).doubleValue();
    }
}

Related

  1. add(final BigDecimal baseAmount, final BigDecimal amountToAdd)
  2. add(final BigDecimal start, final BigDecimal... values)
  3. add(final BigDecimal v1, final BigDecimal v2)
  4. add(Vector a, Vector b)
  5. add2Abs(BigDecimal aValue1, BigDecimal aValue2)
  6. addBigDecimal(BigDecimal a, BigDecimal b)
  7. addBigDecimals(String value1, String value2)
  8. addBigDecimalsInMap(Map baseMap, Map addMap)
  9. addPercent(BigDecimal price, double amount)