可能重複:
What is the difference between a += b and a =+ b , also a++ and ++a?
What is x after 「x = x++」?的Java I ++操作說明
在測試1我加1的值,並返回舊值並保持其增加值在我的變量。但在Test2中,我將它的值遞增1並返回其舊值,並且增量也發生了。他們是否爲我在i變量中沒有賦值的增量複製了i。 Test2的操作步驟是什麼?
Test1的
int i = 0;
System.out.print(i++);
System.out.print(i);
輸出01
的Test2
int i = 0;
i = i++;
System.out.println(i);
輸出0
@這些案件Eng.Fouad無前實際匹配這個 – 2012-07-19 23:10:15
來教育自己,嘗試做「INT I = 0;我++ ; System.out.println(i);「 – DGH 2012-07-19 23:11:04
[This](http://stackoverflow.com/questions/7911776/what-is-x-after-x-x)應該對你感興趣 – Pshemo 2012-07-19 23:11:44