Java List Sum sum(List numbers)

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

Description

sum

License

Apache License

Declaration

public static Integer sum(List<Integer> numbers) 

Method Source Code

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

import java.util.List;

public class Main {
    public static Integer sum(List<Integer> numbers) {
        return numbers.stream().mapToInt(Integer::intValue).sum();
    }/*from   w  ww.  j  av  a2 s.  c o  m*/
}

Related

  1. sum(List scores)
  2. sum(List vals)
  3. sum(List l)
  4. sum(List list)
  5. sum(List lst)
  6. sum(List numbers)
  7. sum(List listOfNumbers)
  8. sum_ints(List list)
  9. sumAll(List list)