ICSE Class 10 Computer Applications
Question 18 of 76
Revising Basic Java Concepts — Question 22
Back to all questions 22
Question Question 14(f)
State the value and type of each expression.
Math.max(1.5e-2, 0.095)The output value is 0.095. The type of expression is double.
Explanation
Math.max(a, b) returns the maximum of a and b. As 0.095 is greater than 1.5e-2, hence, 0.095 is the output. Since the argument is double so the data type of return value is also double.