StringBuider在原有内存上操作是什么意思?
public class HelloWorld {
public static void main(String[] args) {
// 创建一个StringBuilder对象,用来存储字符串
StringBuilder hobby=new StringBuilder("爱慕课");
System.out.println(hobby);
System.out.println(hobby+"haha");
System.out.println(hobby);
}
}
输出:爱慕课 爱慕课haha 爱慕课
怎么体现出在原有内存上操作呢?