Java中有关StringBuffer的相关常用知识以及与String的区别 //1.创建可变字符串StringBuffer strBuffer new StringBuffer();System.out.println(strBuffer);//2.拼接字符串strBuffer.append("少年啊!");System.out.println(strBuffer);strBuffer.append(…
文章目录1.String2.StringBuilder、AbstractStringBuilder3.StringBuffer1.String
public final class String implements……{private final char value[];//存储数组本身private int hash;//用来存储计算后的哈希值
}总结: final修饰类,String类不可继…