Java MCQ: What is the output of Math.floor(3.6)?
a) 3.0
b) 4.0
c) 3.6
d) 3
Answer:
a) 3.0
Explanation:
The Math.floor()
method in Java returns the largest integer that is less than or equal to the argument passed. For Math.floor(3.6)
, it returns 3.0.
Reference links:
https://www.rameshfadatare.com/learn-java-programming/
https://www.javaguides.net/p/java-tutorial-learn-java-programming.html