Java List Sum sum(List l)

Here you can find the source of sum(List l)

Description

sum

License

Apache License

Declaration

private static int sum(List<Integer> l) 

Method Source Code

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

import java.util.List;

public class Main {
    private static int sum(List<Integer> l) {
        int sum = 0;
        for (int i : l) {
            sum += i;/*  w  w w .  j av  a  2 s.  c o m*/
        }
        return sum;
    }
}

Related

  1. sum(List list)
  2. sum(List a)
  3. sum(List data)
  4. sum(List scores)
  5. sum(List vals)
  6. sum(List list)
  7. sum(List lst)
  8. sum(List numbers)
  9. sum(List numbers)