Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3f6eb7b

Browse files
Update Java内存区域.md
1 parent b1bd3bf commit 3f6eb7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎docs/java/jvm/Java内存区域.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ System.out.println(str2==str3);//false
317317
System.out.println(str3 == str5);//true
318318
System.out.println(str4 == str5);//false
319319
```
320-
![](https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-6/字符串拼接.png)
320+
![字符串拼接](https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-7/字符串拼接-常量池2.png)
321321

322322
尽量避免多个字符串拼接,因为这样会重新创建对象。如果需要改变字符串的话,可以使用 StringBuilder 或者 StringBuffer。
323323
### 4.2 String s1 = new String("abc");这句话创建了几个字符串对象?

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /