We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8be1b3f commit c850d73Copy full SHA for c850d73
2 files changed
java/basic/java-basic.md
@@ -255,6 +255,10 @@ System.out.println(s5 == s6); // true
255
- [StackOverflow : What is String interning?](https://stackoverflow.com/questions/10578984/what-is-string-interning)
256
- [深入解析 String#intern](https://tech.meituan.com/in_depth_understanding_string_intern.html)
257
258
+在 jdk6中StringTable是固定的,就是1009的长度,所以如果常量池中的字符串过多就会导致效率下降很快。在jdk7中,StringTable的长度可以通过一个参数指定:
259
+
260
+ -XX:StringTableSize=99991
261
262
## new String("abc")
263
264
使用这种方式一共会创建两个字符串对象(前提是 String Pool 中还没有 "abc" 字符串对象)。
tool/btrace.md
@@ -0,0 +1,5 @@
1
+### FAQ
2
+1. btrace DEBUG: adding to boot classpath failed!
3
+ 常见是由于系统安装的btrace版本和代码中引入的jar的版本不匹配,建议加载jar(/btrace/../build/)
4
+2. Port 2020 unavailable.
5
+ 2020端口不可用,那就换一个:btrace pid -p port xxx.java
0 commit comments