hollischuang / toBeTopJavaer

To Be Top Javaer - Java工程师成神之路

Home Page:https://www.hollischuang.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

第八章 字符串

meditat0r opened this issue · comments

8.12 intern P113
intern的描述原则有误,应为:如果常量池中存在当前字符串,则直接返回原引用;如果常量池中没有此字符串,则将此字符串的引用放入常量池,然后返回常量池中的该引用。