為什么輸出的是 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
舉報
2016-03-10
前面有一句three=one+two的,后面這個three+=one是接著前面的
2016-03-10
輸出是10,你應該是執行了幾次后沒有退出,你重新編譯運行一下試試。
2016-03-10
輸出的是10? 是不是沒有保存? 就運行了?先保存再運行一次試試