結(jié)果輸出使用+連接,但是輸出的卻是2個(gè)結(jié)果的和,而不是分別輸出結(jié)果
public class HelloWorld{
??? public static void main(String[] args) {
?? ???? int one = 10 ;
??????? int two = 20 ;
??????? int three = 0 ;
??????? int three1=one+two;
??????? int four=one-two;
??????? System.out.println(three1+four);
?????? ?
???????
2016-12-29
就是輸出兩個(gè)結(jié)果的和??梢韵?樓那樣加一個(gè)空字符,這樣就是輸出30-10了,或者加\n或\t什么的,
如System.out.println(three1+"\t"+four); ?結(jié)果就是30 ? ?-10
2016-12-29
樓上倆是在扯淡?還是我孤陋寡聞了?
System.out.println(three1+""+four);
2016-12-29
System.out.println(three1,four);
2016-12-29