Here you can find the source of averageDouble(final List
public static double averageDouble(final List<Double> values)
//package com.java2s; import java.util.List; public class Main { public static double averageDouble(final List<Double> values) { final double size = values.size(); double avg = 0; for (final double v : values) avg += v / size;/*from w w w.j a v a 2 s .com*/ return avg; } }