Java 7/8 String interning is not working as expected

前端 未结 0 462
慢半拍i
慢半拍i 2020-12-08 05:37

According to Strings behavior in Java, we have the following points:

  • When a String literal is used, then it is automatically interned
  • When we use new S
相关标签:
回答
  • 消灭零回复
提交回复
热议问题