ICSE Class 10 Computer Applications Question 20 of 76

Revising Basic Java Concepts — Question 24

Back to all questions
24
Question

Question 14(h)

State the value and type of each expression.

Math.min(-5, 1.0)
Answer

The output value is -5.0. The type of expression is double.

Explanation

Math.min(a, b) returns the minimum of a and b. As one of the arguments is of double type hence, data type of return value is also double.