ICSE Class 9 Computer Applications Question 15 of 21

Operators in Java — Question 15

Back to all questions
15
Question

Question 15

Rewrite the following statements without using shorthand operators.

a. p /= q
b. p -= 1
c. p *= q + r
d. p -= q - r

Answer

a. p = p / q
b. p = p - 1
c. p = p * (q + r)
d. p = p - (q - r)