public static int floorDiv (int x, int y)

Returns the largest (closest to positive infinity) int value that is less than or equal to the algebraic quotient. There is one special case, if the dividend is the Integer.MIN_VALUE and the divisor is -1, then integer overflow occurs and the result is equal to the Integer.MIN_VALUE.

See Math.floorDiv for examples and a comparison to the integer division / operator.

Parameters:
x    the dividend
y    the divisor

Returns:  the largest (closest to positive infinity) int value that is less than or equal to the algebraic quotient.

Exceptions:
ArithmeticException    if the divisor y is zero

See also:
Math.floorDiv(int, int), Math.floor(double)

Since:  1.8