Java Number Add add(String number1, String number2)

Here you can find the source of add(String number1, String number2)

Description

add

License

Apache License

Declaration

public static String add(String number1, String number2) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.math.BigDecimal;

public class Main {

    public static String add(String number1, String number2) {
        BigDecimal bd = new BigDecimal(number1);
        return bd.add(new BigDecimal(number2)).toString();
    }/*from  w w w .ja v a 2 s.c  om*/
}

Related

  1. add(long v1, long v2)
  2. add(long val, long augend)
  3. add(Number a, Number b)
  4. add(Object addend, Object augend)
  5. add(Object num1, Object num2)
  6. add(T a, T b)
  7. add1(Double v1, Double v2)
  8. add4Money(Double value1, Double value2)
  9. addAmounts(final double num1, final double num2)