auto commit

This commit is contained in:
CyC2018
2018-08-26 15:41:50 +08:00
parent b75f85c617
commit e57025b873
3 changed files with 16 additions and 25 deletions

View File

@ -215,7 +215,7 @@ String s5 = "bbb";
System.out.println(s4 == s5); // true
```
在 Java 7 之前,字符串常量池被放在运行时常量池中,它属于永久代。而在 Java 7字符串常量池被移到 Native Method 中。这是因为永久代的空间有限,在大量使用字符串的场景下会导致 OutOfMemoryError 错误。
在 Java 7 之前,字符串常量池被放在运行时常量池中,它属于永久代。而在 Java 7字符串常量池被移到中。这是因为永久代的空间有限,在大量使用字符串的场景下会导致 OutOfMemoryError 错误。
- [StackOverflow : What is String interning?](https://stackoverflow.com/questions/10578984/what-is-string-interning)
- [深入解析 String#intern](https://tech.meituan.com/in_depth_understanding_string_intern.html)