We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b66618 commit 5962dcaCopy full SHA for 5962dca
docs/java/jvm/memory-area.md
@@ -378,7 +378,7 @@ System.out.println(c == d);// true
378
final String str1 = "str";
379
final String str2 = getStr();
380
String c = "str" + "str2";// 常量池中的对象
381
-String d = str1 + str2; // 常量池中的对象
+String d = str1 + str2; // 在堆上创建的新的对象
382
System.out.println(c == d);// false
383
public static String getStr() {
384
return "ing";
0 commit comments