StringBuffer类

public class StringBufferDemo {
    public static void main(String args[])
    {
        StringBuffer sb = new StringBuffer("hello");
        System.out.println("buffer ="+sb);
     System.out.println("buffer ="+sb.toString());
System.out.println("buffer ="+sb.length());
System.out.println("buffer ="+sb.capacity()); } }

  

posted on 2020-12-01 23:06  lydstory  阅读(227)  评论(0)    收藏  举报

导航