; // 拼接 stringBuffer.append(str1).append(str2); // 转换为String对象 String all = stringBuffer.toString(); // 输出 System.out.println(all);