Java List Average average(List numbers)

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

Description

average

License

Open Source License

Parameter

Parameter Description
numbers - doubles

Return

their average

Declaration

public static double average(List<Double> numbers) 

Method Source Code

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

import java.util.List;

public class Main {
    /**//from  ww  w .j av a 2 s. co  m
     *    
     * @param numbers - doubles
     * @return their average
     */
    public static double average(List<Double> numbers) {

        double sum = 0;
        for (Double number : numbers)
            sum += number;
        return sum / numbers.size();
    }
}

Related

  1. addAverage(List list, int InColumn1, int InColumn2, int resultColumn)
  2. average(final List vals, final int maxI)
  3. average(List collected)
  4. average(List arr)
  5. average(List list)
  6. average(List observations)
  7. average(List collection)
  8. averageDouble(final List values)
  9. averageLog(List logList)