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