Java BigDecimal Add addBigDecimals(String value1, String value2)

Here you can find the source of addBigDecimals(String value1, String value2)

Description

add Big Decimals

License

Open Source License

Declaration

public static String addBigDecimals(String value1, String value2) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2006-2010 eBay Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *******************************************************************************/

import java.math.BigDecimal;

public class Main {
    public static String addBigDecimals(String value1, String value2) {
        BigDecimal result = (new BigDecimal(value1.trim())).add(new BigDecimal(value2.trim()));
        return String.valueOf(result);
    }// ww  w  .  j  a va  2  s.  co m
}

Related

  1. add(final BigDecimal v1, final BigDecimal v2)
  2. add(Vector a, Vector b)
  3. add2Abs(BigDecimal aValue1, BigDecimal aValue2)
  4. addBigDec(BigDecimal b1, BigDecimal b2)
  5. addBigDecimal(BigDecimal a, BigDecimal b)
  6. addBigDecimalsInMap(Map baseMap, Map addMap)
  7. addPercent(BigDecimal price, double amount)
  8. addQtde(BigDecimal val1, BigDecimal val2)
  9. addSalePrice(Map complexSalePrice, BigDecimal saleprice)