Here you can find the source of add(Object addend, Object augend)
public static BigDecimal add(Object addend, Object augend)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; public class Main { public static final int SCALE = 2; public static final int ROUNDING_MODE = BigDecimal.ROUND_HALF_UP; public static BigDecimal add(Object addend, Object augend) { return new BigDecimal(addend.toString()).add(new BigDecimal(augend.toString())).setScale(SCALE, ROUNDING_MODE);//from w w w . j ava 2s.c o m } }