0
what is Math.floor and Math.ceil in java?
2 Answers
+ 6
well if you ceil a float, it will result in the next integer of that float a d if you floor that it will tesult in the previous integer.
for examlpe, suppose you live in the 6th floor of your building and floating in air in your room.đđ
now, if I ceil you, you will touch the ceiling and your value will be 7 and if I floor you you will come normal with a value of 6.
+ 1
Hi. Those methods do number rounding to integer. Ceil does it upwards, floor does downwards