Here you can find the source of meanArithmetic(LinkedList
public static double meanArithmetic(LinkedList<Double> a)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static double meanArithmetic(LinkedList<Double> a) { int n = a.size(); double sum = 0.0; for (int i = 0; i < a.size(); i++) { sum = sum + a.get(i);/*from w w w. j ava 2 s. co m*/ } return sum / n; } }