ICSE Class 10 Computer Applications Question 13 of 76

Revising Basic Java Concepts — Question 17

Back to all questions
17
Question

Question 14(a)

State the value and type of each expression.

Math.abs(-5) - Math.abs(-7)
Answer

The output value is -2. The type of expression is int.

Explanation

    Math.abs(-5) - Math.abs(-7)
⇒ 5 - 7
⇒ -2