Skip to content

Commit

Permalink
Java 基础 219行笔误
Browse files Browse the repository at this point in the history
应是 s5 == s6
  • Loading branch information
yif-hong authored Sep 13, 2018
1 parent 3c9580f commit b88cef1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notes/Java 基础.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ System.out.println(s3 == s4); // true
```java
String s5 = "bbb";
String s6 = "bbb";
System.out.println(s4 == s5); // true
System.out.println(s5 == s6); // true
```

Java 7 之前,String Pool 被放在运行时常量池中,它属于永久代。而在 Java 7String Pool 被移到堆中。这是因为永久代的空间有限,在大量使用字符串的场景下会导致 OutOfMemoryError 错误。
Expand Down

0 comments on commit b88cef1

Please sign in to comment.