Advertisements
Advertisements
Question
Math.round() returns the value in float data type.
Options
True
False
MCQ
True or False
Solution
This statement is False.
Explanation:
The Math.round() function in Java can return two kinds of values:
- When called with a float input, it returns an integer.
- When used with a double argument, it gives a long.
Thus, Math.round() cannot return a float data type.
shaalaa.com
Is there an error in this question or solution?