Java Compound Assignment Operators
What is printed when the following code segment is executed?
int count = 5;
count++;
count += 2;
count--;
System.out.println(count);
A
7
B
6
C
8
D
9
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | bommasam000 | 2 | 2 | 0m 19s | 181 |
| #2 | kaisuki | 1 | 1 | 0m 00s | 100 |
| #3 | liuwilliam072410 | 1 | 1 | 0m 09s | 91 |
| #4 | pandasiteitei | 1 | 1 | 0m 34s | 66 |
| #5 | lsj08030922 | 1 | 2 | 0m 32s | 58 |
| #6 | zgj07310417 | 1 | 1 | 1m 03s | 37 |
| #7 | chunxiangxu.cxu | 0 | 1 | 0m 10s | -20 |
| #8 | richa.tuli | 1 | 2 | 7m 09s | -339 |
Items per page:
10
1 – 8 of 8
