StringBuffer和StringBuilder类

2017-10-10 14:22:00
admin
原创
518
public class Test{

    public static void main(String args[]){
       StringBuffer sBuffer = new StringBuffer(" test StringBuffer");
       StringBuilder sBuilder = new StringBuilder(" test StringBuilder");
       sBuffer.append(" String Buffer");
       sBuilder.append(" String Builder");
       System.out.println(sBuffer);  
       System.out.println(sBuilder);  
   }
}
  • QQ讨论群
  • 关注微信
    • 欢迎咨询
    • 欢迎加入QQ群 16506021
  • 公众号:源宝网络