请在 下方输入 要搜索的题目:

以下代码 String s1 = "Welcome to Java!"; String s2 = "Welcome to Java!";s1 == s2是否返回true


A、正确;
B、错误

发布时间:2025-06-01 01:04:30
推荐参考答案 ( 由 快搜搜题库 官方老师解答 )
联系客服
答案:正确 【分析】:Since strings are immutable and are ubiquitous in programming, to improve efficiency and save memory, the JVM uses a unique instance for string literals with the same character sequence. Such an instance is called interned.
专业技术学习
专业技术学习
搜搜题库系统