//String字符串、在进行字符串拼接的时候总是改变栈中指向堆中的位置

//StringBuffer字符串、在进行字符串拼接的时候不改变栈中指向堆中的位置

package com.java.chap05.sec02;

public class TestStringBuffer {

public static void main(String[] args) {

String str="123";
str+="abc";
System.out.println(str);

StringBuffer sb=new StringBuffer("123");
sb.append("abc");
System.out.println(sb.toString());

}
}

最新文章

  1. react入门(4)
  2. 使用jQuery加载html页面到指定的div
  3. Python 科学计算涉及模块
  4. jdk之jhat命令
  5. [OOD]违反里氏替换原则的解决方案
  6. grails导入excel
  7. GDI+中发生一般性错误之文件被占用
  8. Contest20140906 ProblemA dp+线段树优化
  9. libvirt 命令行交互工具之virsh
  10. [<DDGuessYouLIkeModel 0x7c99faf0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key star.
  11. HDU 1720 A+B Coming
  12. hdu5171(矩阵快速幂)
  13. Azure File Service in IIS
  14. MES制造执行系统启动篇
  15. 关于ios手机游览器针对overflow:hidden设置无效的解决办法
  16. 国内第一本micropython的书出版《机器人Python极客编程入门与实战》
  17. 记一次与iframe之间的抗争
  18. python 冒泡、二分查找
  19. pytest+request 接口自动化测试
  20. [转载] python必碰到的问题---encode与decode,中文乱码

热门文章

  1. linux正则表达式基础
  2. excel批量提取网页标题
  3. day9http协议
  4. 网络爬虫之Xpath用法汇总
  5. SQL Server中的聚集索引(clustered index) 和 非聚集索引 (non-clustered index)
  6. Swoole 多协议 多端口 的应用
  7. SCUT - 205 - 饲养牛 - 最大流
  8. 洛谷P2513 [HAOI2009]逆序对数列
  9. 洛谷P1722 矩阵 II(Catalan数)
  10. Vue中登录模块