Android Collection Sum getLongListSum(Collection c)

Here you can find the source of getLongListSum(Collection c)

Description

get Long List Sum

Declaration

public static Long getLongListSum(Collection<Long> c) 

Method Source Code

//package com.java2s;
import java.util.Collection;

public class Main {

    public static Long getLongListSum(Collection<Long> c) {
        Long sum = 0l;//from   w w  w  . j  a v  a  2 s.  c  om
        for (Long i : c) {
            sum += i;
        }
        return sum;
    }
}

Related

  1. getIntListSum(Collection c)