牛客网刷题------选择题

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
相关文章
相关标签/搜索