Skip to content

Commit 600387f

Browse files
authored
docs: fix incorrect value in auto-increment answer (c = 10 -> c = 11) (#2905)
int a = 9; // a = 9 int b = a++; // b = 9,a = 10 int c = ++a; // a = 11,c = 11 int d = c--; // d = 11,c = 10 int e = --d; // d = 10,e = 10
1 parent 1d56e02 commit 600387f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎docs/java/basis/java-basic-questions-01.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ int d = c--;
346346
int e = --d;
347347
```
348348
349-
答案:`a = 11`、`b = 9`、 `c = 10`、 `d = 10`、 `e = 10`。
349+
答案:`a = 11`、`b = 9`、 `c = 11`、 `d = 10`、 `e = 10`。
350350
351351
### ⭐️ 移位运算符
352352

0 commit comments

Comments
 (0)