Here you can find the source of add(BigDecimal a, BigDecimal b)
Parameter | Description |
---|---|
a | big decimal two |
b | big decimal one |
private static BigDecimal add(BigDecimal a, BigDecimal b)
//package com.java2s; import java.math.BigDecimal; public class Main { /**// www .ja va 2 s. co m * Null safe convenience method for adding two BigDecimal objects. * * @param a big decimal two * @param b big decimal one * @return sum of the two big decimals */ private static BigDecimal add(BigDecimal a, BigDecimal b) { if (a == null) return b; if (b == null) return a; return a.add(b); } }