English

Math.round() returns the value in float data type. - Computer Applications

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:

  1. When called with a float input, it returns an integer.
  2. 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?
Chapter 1.07: Mathematical Library Methods - EXERCISES [Page 80]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.07 Mathematical Library Methods
EXERCISES | Q II. 6. | Page 80
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×