Computer Science, asked by vishushail, 7 months ago

1
Predict the output
System out println (Math.abs (math. ceil(-6.35)));​

Answers

Answered by allysia
7

Answer:

It's output should be:

6.0

Explanation:

Math.ceil(num) will return greater integer than the decimal value entered, here 6.35 when passed through this function it will return -6.0.

Math.abs(num) returns positive value of the parameter passed through it which here changes -6.0  to 6.0.

Similar questions