String
2019-08-20 本文已影响0人
Leahlijuan
StringBuilder str = new StringBuilder();
str.append("a");
str.toString();
sb.deleteCharAt(sb.length() - 1)
// equals vs ==
s1.equals(s2); // 判断s1和s2是不是组成相同
s1 == s2; // 判断s1和s2是不是指向同个object, 更严格
StringBuilder str = new StringBuilder();
str.append("a");
str.toString();
sb.deleteCharAt(sb.length() - 1)
// equals vs ==
s1.equals(s2); // 判断s1和s2是不是组成相同
s1 == s2; // 判断s1和s2是不是指向同个object, 更严格