Here you can find the source of add(BigDecimal obj1, BigDecimal obj2)
Parameter | Description |
---|---|
obj1 | BigDecimal |
obj2 | BigDecimal |
public static BigDecimal add(BigDecimal obj1, BigDecimal obj2)
//package com.java2s; /*// w w w. j ava2s.c o m * Copyright (C) 2010 Viettel Telecom. All rights reserved. * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ import java.math.BigDecimal; public class Main { /** * add * * @param obj1 BigDecimal * @param obj2 BigDecimal * @return BigDecimal */ public static BigDecimal add(BigDecimal obj1, BigDecimal obj2) { if (obj1 == null) { return obj2; } else if (obj2 == null) { return obj1; } return obj1.add(obj2); } }