摘要: 1:默认初始长度 16 public StringBuffer() { super(16);} 2:append追加 @Override public synchronized StringBuffer append(String str) { toStringCache = null; super 阅读全文
posted @ 2020-05-13 22:31 Draymond 阅读(573) 评论(0) 推荐(0) 编辑
摘要: hashCode public int hashCode() { int h = hash; if (h == 0 && value.length > 0) { //hash 默认值为0(此时还没有计算hash) && String中的字节数组有值(使用 String str="avc"; hash 阅读全文
posted @ 2020-05-13 22:26 Draymond 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1.1 equals 与 hashCode https://blog.csdn.net/zj15527620802/article/details/88547914 1.2 equals public boolean equals(Object obj) { return (this == obj) 阅读全文
posted @ 2020-05-13 21:11 Draymond 阅读(135) 评论(0) 推荐(0) 编辑