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

  1. ch = ch + 2
  2. ch + 2
  3. ch =+ 2
  4. none of the above
Answer

ch = ch + 2

Reason+= is a shorthand operator. The operator pair += tells the compiler to assign to ch the value of ch + 2.