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
8
B
9
C
7
D
6
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 | lsj08030922 | 1 | 2 | 0m 32s | 58 |
| #5 | zgj07310417 | 1 | 1 | 1m 03s | 37 |
| #6 | chunxiangxu.cxu | 0 | 1 | 0m 10s | -20 |
| #7 | richa.tuli | 1 | 2 | 7m 09s | -339 |
Items per page:
10
1 – 7 of 7
APFIVE