OOPS
August 29, 2024OOPS
August 29, 2024OOPS
|
Question 96
|
Find the output of the following Java code line
System.out.println(math.floor(-7.4))
System.out.println(math.floor(-7.4))
|
-7
|
|
|
-8
|
|
|
-7.4
|
|
|
-7.0
|
Question 96 Explanation:
The method floor gives the largest integer that is less than or equal to the argument.
But here the argument is negative value.
Floor of -7.4 will return the lower limit, i.e. -8.
But here the argument is negative value.
Floor of -7.4 will return the lower limit, i.e. -8.
Correct Answer: B
Question 96 Explanation:
The method floor gives the largest integer that is less than or equal to the argument.
But here the argument is negative value.
Floor of -7.4 will return the lower limit, i.e. -8.
But here the argument is negative value.
Floor of -7.4 will return the lower limit, i.e. -8.
