空格的問題
public class HelloWorld{ ??
?public static void main(String[] args) {
?int a=12;?
?int b=24;
?int sum=a + b;?
?System.out.println("兩數(shù)之和為:"+sum);
? ? }
}?
為什么是int sum=a + b;不是int sum=a+b;就是說為什么要空格呢?
public class HelloWorld{ ??
?public static void main(String[] args) {
?int a=12;?
?int b=24;
?int sum=a + b;?
?System.out.println("兩數(shù)之和為:"+sum);
? ? }
}?
為什么是int sum=a + b;不是int sum=a+b;就是說為什么要空格呢?
2016-07-27
舉報
2016-07-27
你指的是a + b符號之間的空格嗎?沒有一定要求空格,加上空格指示代碼更加清晰,美觀好看而已,對功能沒有影響。
2016-07-27
應(yīng)該是這個平臺編譯的問題 我有提交不了的 復(fù)制到eclipse運行 就成功了
2016-07-27
不加空格提交不了