Computer Science, asked by bhasinneelam1956, 7 months ago

14. What will be the output of the following code?
float x = 11.27;
System.out.println(Math.floor(x));

Answers

Answered by d14sr
1

HOPE IT HELPS YOU.

PLEASE MARK MY ANSWER AS BRAINLIEST!!!

The answer is 7.0 as:-

--> The Math.floor() function returns the largest integer less than or equal to a given number.

--> Because floor() is a static method of Math, you always use it as Math.floor(), rather than as a method of a Math object you created (Math is not a constructor).

Similar questions