ICSE Class 10 Computer Applications
Question 73 of 76
Revising Basic Java Concepts — Question 7
Back to all questions 7
Question Question 7
ch += 2 is equivalent to
- ch = ch + 2
- ch + 2
- ch =+ 2
- none of the above
ch = ch + 2
Reason — += is a shorthand operator. The operator pair += tells the compiler to assign to ch the value of ch + 2.