Java Number Sum sum(long space1, String space2)

Here you can find the source of sum(long space1, String space2)

Description

sum

License

Mozilla Public License

Declaration

public static long sum(long space1, String space2) 

Method Source Code

//package com.java2s;
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

public class Main {
    public static long sum(long space1, String space2) {
        if (space1 == 0) {
            return Long.parseLong(space2);
        }/*from  w ww  .  j av a  2 s  .  c  om*/
        long total2 = Long.parseLong(space2);

        return space1 + total2;
    }
}

Related

  1. sum(final Iterable ns)
  2. sum(int a, int b)
  3. sum(int matrix1, int matrix2)
  4. sum(Iterable as)
  5. sum(Iterable iterable)
  6. sum(long x, int c)
  7. sum(Number n1, Number n2)
  8. Sum(Object in, int min, int max)
  9. sum(String fieldName)