0
How does += work?
4 Answers
+ 1
it is same as increment operator
+ 11
foo += var
is the same as
foo = foo + var
+ 9
x+=5
is the same as
x=x+5
0
if you want to add a value to the variable itself . that is
int a=5;
a+=5 makes the value of a to 10