Android examples for java.lang:array calculation
mean value from double array
//package com.java2s; public class Main { public static double mean(double[] a) { double sum = 0; for (double i : a) { sum += i;/*from w ww . j av a2 s. c o m*/ } return sum / a.length; } }