What does the math.ceil and math.floor method do in Java?
Answers
Answered by
1
Hey dude !
In Java, math ceil returns the smallest integer that is greater than or equal to the argument.
And,
In Java,math floor returns the largest integer that is less than or equal to the argument.
Hope this will help you
please try to mark it as brainliest. ...
Answered by
31
- Math.ceil() is used to return the higher integer for the given argument.
- For example:-
- Code:- Math.ceil(5.7)
- Output:- 6
________________________________
- Math.floor() is used to return the lower integer for the given argument.
- For example:-
- Code:- Math.floor(5.7)
- Output:- 5
Similar questions