(hobby)和("hobby")的輸出結果為什么不一樣?
String hobby="慕課網";
為什么System.out.println("hobby");
和System.out.println(hobby);運行的結果不一致?
一個是hobby,另一個是慕課網
String hobby="慕課網";
為什么System.out.println("hobby");
和System.out.println(hobby);運行的結果不一致?
一個是hobby,另一個是慕課網
2018-04-06
舉報
2018-04-06
(hobby)是變量bobby
("hobby")是字符串“hobby”
System.out.println(hobby);運行結果輸出的是變量hobby的值"慕課網"
System.out.println(“hobby”);運行結果輸出的是字符串”hobby"
2018-04-06