Android Collection Sum getIntListSum(Collection c)

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

Description

get Int List Sum

Declaration

public static int getIntListSum(Collection<Integer> c) 

Method Source Code

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

public class Main {

    public static int getIntListSum(Collection<Integer> c) {
        int sum = 0;
        for (Integer i : c) {
            sum += i;/*  w w w .  j  a  v  a2  s. c o  m*/
        }
        return sum;
    }
}

Related

  1. getLongListSum(Collection c)