Here you can find the source of getMean(List
public static double getMean(List<Double> list)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static double getMean(List<Double> list) { double sum = 0.0; for (double value : list) { sum += value;//from ww w. ja v a 2 s .co m } return sum / list.size(); } }