為什么輸出的是 40?
public class disanzhang3{ ? ?public static void main(String[] args) { ? ?
?int one = 10 ; ? ? ?
?int two = 20 ; ? ? ? ?
?int three = 0 ; ? ? ?
?three+=one;
?System.out.println("three+=one ==>" +three);
為什么輸出的是 40?
public class disanzhang3{ ? ?public static void main(String[] args) { ? ?
?int one = 10 ; ? ? ?
?int two = 20 ; ? ? ? ?
?int three = 0 ; ? ? ?
?three+=one;
?System.out.println("three+=one ==>" +three);
為什么輸出的是 40?
2016-03-10
舉報(bào)
2016-03-10
前面有一句three=one+two的,后面這個(gè)three+=one是接著前面的
2016-03-10
輸出是10,你應(yīng)該是執(zhí)行了幾次后沒(méi)有退出,你重新編譯運(yùn)行一下試試。
2016-03-10
輸出的是10? 是不是沒(méi)有保存? 就運(yùn)行了?先保存再運(yùn)行一次試試