+ 1
Plz explain this JAVA code.
Explain this code: đđđ int x = 1; x += x++; System.out.print(x);
2 Answers
+ 7
Jawad Shopnil
int x = 1;
x += x++;
x = x + x++;
x = 1 + 1;
x = 2;
+ 3
Remember x++ first uses the value then increment the value