Java List Average getAverage(List values)

Here you can find the source of getAverage(List values)

Description

get Average

License

Apache License

Declaration

private static double getAverage(List<Double> values) 

Method Source Code


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

import java.util.List;

public class Main {
    private static double getAverage(List<Double> values) {
        double sum = 0d;
        for (Double d : values) {
            sum += d;//from ww  w  . j a va  2s .  c  om
        }
        return sum / values.size();
    }
}

Related

  1. calculateAverage(List list)
  2. computeAverage(List aList)
  3. getAverage(int period, List timeline)
  4. getAverage(List list)
  5. getAverage(List l)
  6. getAverage(List values)
  7. getAverage(List values)
  8. getAverage(List numbers)
  9. getAverageColour(List colours)