【JDK源碼分析】String的存儲區與不可變性(轉)

// ... literals are interned by the compiler // and thus refer to the same object String s1 = "abcd"; String s2 = "abcd"; s1 == s2; // --> true // ... These two have the same value // but they are not
相關文章
相關標籤/搜索