请问字符串变量的指针指向实例还是字符串常量池?I can't understand why the main text must has more than 30 words.
收起
参考: 如何区分String的实例指向堆还是常量池中_a_63416646的博客-CSDN博客 最近看JVM的时候,看到一个很有意思的题目,如下String s1 = new String("111");String s2 = "111";String s3 = s1.intern();System.out.println(s1 == s2);System.out.printlin(s2 == s3);第一个返回的结果是false第二个返回的结果是trues1实例指向的是... https://blog.csdn.net/a_63416646/article/details/93469582
报告相同问题?