Can we avoid interning of strings in java?

后端 未结 4 754
傲寒
傲寒 2020-12-20 01:51

Can we completely disable interning of strings. It might not be really helpful, but just a thought. I can think atleast one point where it could be helpful i.e. during jvm t

4条回答
  •  一个人的身影
    2020-12-20 02:29

    Since Oracle's Java 7 the intern string pool isn't stored in PerGen anymore. Read more here http://java-performance.info/string-intern-in-java-6-7-8/

提交回复
热议问题