Java Collection Sum sum(Collection collection)

Here you can find the source of sum(Collection collection)

Description

sum

License

Open Source License

Declaration

public static double sum(Collection<Double> collection) 

Method Source Code


//package com.java2s;

import java.util.*;

public class Main {
    public static double sum(Collection<Double> collection) {
        double total = 0.;
        for (double value : collection)
            total += value;/*from www .ja  v  a2s.co  m*/
        return total;
    }
}

Related

  1. sum(Collection numbers)
  2. sum(Collection list)
  3. sum(Collection values)
  4. sum(Collection values)
  5. sum(Collection values)