Here you can find the source of average(final int totalAmount, final int orderCount)
public static int average(final int totalAmount, final int orderCount)
//package com.java2s; //License from project: Apache License public class Main { public static int average(final int totalAmount, final int orderCount) { return orderCount == 0 ? 0 : Math .round((100.0f * totalAmount / orderCount) / 100); }/*w ww . j a va 2 s . c om*/ }