String的intern()方法

哎呦,發現了一個總結的不錯的blog:https://tech.meituan.com/in_depth_understanding_string_intern.html String s = "123";  String s1 = new String("123"); 然而s == s1 麼? 答案是不等於的。於是帶着這個問題開始了下面的探究.......  這兩種初始化的方式有什麼區別呢? 1
相關文章
相關標籤/搜索