String s1 = new StringBuilder("go").append("od").toString(); System.out.println(s1.intern() == s1); String s2 = new StringBuilder("ja").append("va").toString(); System.out.println(s2.intern() == s2);
本文共 252 字,大约阅读时间需要 1 分钟。
String s1 = new StringBuilder("go").append("od").toString(); System.out.println(s1.intern() == s1); String s2 = new StringBuilder("ja").append("va").toString(); System.out.println(s2.intern() == s2);
转载于:https://www.cnblogs.com/valarchie/p/6962345.html