牛客網刷題------選擇題

1,有以下代碼片段: String str1="hello"; String str2="he"+ new String("llo"); System.out.println(str1==str2); 請問輸出的結果是: A false B true C null D 以上都錯 解析:答案是A String str2="he"+ new String("llo");指向的是堆裏定義的字符串「hel
相關文章
相關標籤/搜索