Here you can find the source of averageValue(List extends Number> oper)
public static Number averageValue(List<? extends Number> oper)
//package com.java2s; import java.util.List; public class Main { public static Number averageValue(List<? extends Number> oper) { double avg = 0.0; for (int i = 0, j = oper.size(); i < j; i++) { avg += oper.get(i).doubleValue(); }// ww w. j a va 2s .c o m return avg / oper.size(); } }