Here you can find the source of getArrayAvg(int... i)
public static int getArrayAvg(int... i)
//package com.java2s; public class Main { public static int getArrayAvg(int... i) { return getArraySum(i) / i.length; }/*from ww w. jav a2s.c o m*/ public static int getArraySum(int... i) { int sum = 0; for (int j = 0; j < i.length; j++) { sum += i[j]; } return sum; } }