package com.sf._02_可变字符串stringBuild;

public class Test {
    public static void main(String[] args) {
        /**
         * 创建StringBuild
         */
        StringBuilder stringBuilder = new StringBuilder();
//        StringBuilder stringBuilder1 = new StringBuilder(64);

//        stringBuilder.append("abc");
//        stringBuilder.append("fanjialong");
        //方法调用支持链式编程    类.方法().方法().方法()
        stringBuilder.append("abc").append("bcd");
        // 查看长度
        stringBuilder.length();
        // 把可变字符串变成不可变字符串
        String str = stringBuilder.toString();

        System.out.println(stringBuilder);
    }
}
