ICSE Class 10 Computer Applications Question 15 of 30

Solved 2024 Question Paper ICSE Class 10 Computer Applications — Question 20

Back to all questions
20
Question

Question 1(xx)

Which of the following mathematical methods returns only an integer?

  1. Math.ceil(n)
  2. Math.sqrt(n)
  3. Math.floor(n)
  4. Math.round(n)
Answer

Math.round(n)

Reason — In Java, Math.round(n) is the only method in the list that returns an integer when called with a floating-point number (float or double).