Here you can find the source of div(int a, int b)
public static int div(int a, int b)
//package com.java2s; //License from project: Apache License public class Main { public static int div(int a, int b) { return (a + b / 2) / b; }/*w w w . j av a2 s . c o m*/ public static long div(long a, long b) { return (a + b / 2) / b; } }