Here you can find the source of add(long v1, long v2)
Parameter | Description |
---|---|
v1 | a parameter |
v2 | a parameter |
public static long add(long v1, long v2)
//package com.java2s; /**// w ww . j a va2s . c o m * (C) 2011-2012 Alibaba Group Holding Limited. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * */ import java.math.BigDecimal; public class Main { /** * @param v1 * @param v2 * @return */ public static long add(long v1, long v2) { BigDecimal b1 = new BigDecimal(v1); BigDecimal b2 = new BigDecimal(v2); return b1.add(b2).longValue(); } }