Here you can find the source of mean(Double... values)
public static double mean(Double... values)
//package com.java2s; //License from project: Apache License import java.util.Arrays; import java.util.List; public class Main { public static double mean(Double... values) { return mean(Arrays.asList(values)); }//w w w.ja v a 2 s. c o m public static double mean(List<Double> elems) { double sum = 0; for (Double d : elems) { sum += d; } return sum / elems.size(); } }