Java ArrayList Sum sum(ArrayList values)

Here you can find the source of sum(ArrayList values)

Description

sum

License

Open Source License

Declaration

private static Double sum(ArrayList<Double> values) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;

public class Main {
    private static Double sum(ArrayList<Double> values) {
        Double sum = 0.0;//from  www  .ja v a2s  .  c om
        for (Double num : values) {
            sum += num;
        }
        return sum;
    }
}

Related

  1. Sum(ArrayList values)
  2. sum(ArrayList values)
  3. sum(ArrayList a)
  4. sumInColumns(ArrayList lines)
  5. sumVector(ArrayList v1, ArrayList v2)