Java??i=i++???????
???????????? ???????[ 2015/11/12 10:29:26 ] ??????????????? ???????????
????int i = 0;
????i = i++;
???????????0
?????????
???????????????????????????++????棬?????????i??“???”???????i++????????????0????????????????????????????????????????????????????++?????????????????????????0
????????????????????
????int i = 0;//?????????
????i = i++;//??Ч??????????
????int temp = i;//???temp??i++??????????
????i++; //i????
????i = temp;//?????????????????i
????????java????????????????????????c????c++?п??????????????????????????и????????????????????
???????????:??????????????ж???????????????????
?????????????????ο????????????£?
????public class Test {
????public static void main(String... args) {
????int i = 0;
????i = i++;
????System.out.println(i);
????}
????}
???????javac??????????javap -c Test????????????????????????£????main????????
????public static void main(java.lang.String[]);
????Code:
????0: iconst_0
????1: istore_1
????2: iload_1
????3: iinc 1?? 1
????6: istore_1
????7: getstatic #2; //Field java/lang/System.out:Ljava/io/PrintStream;
????10: iload_1
????11: invokevirtual #3; //Method java/io/PrintStream.println:(I)V
????14: return
????????????0?п?????????????С????????????????????????????????
????0????????0??????????????0??
????1????????????????????0?????浽???????????????1????????i??????????????????
????2??????????????????1????????i???????????????????0??
????3??????????????????1????????i???????????????????????????1????????i???????1??????????0??
????6??????????????????浽??????????????1?????i???????????i??????0????????????
????7??????????????????2?????????????????System.out???????????
????10??????????????????1????????i???????????????0??
????11?????ó??????????3??????????System.out.println
????14??????main????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11