Because the Java code is performing an integer division:
height = 720 'declared as an int
devide = height / 300 'declared as Double
whereas the BASIC "/" is usually a floating point division. Floor() removes the fractional component, converting a floating point value to an integer.
Well, for positive numbers, at least, but division here is always of two positive values, so the result will always be positive too.