不是说可以拼接嘛?为什么不能拼接啊
public class HelloWorld { public static void main(String[] args) { // 创建一个StringBuilder对象,用来存储字符串 StringBuilder hobby=new StringBuilder("爱慕课"); StringBuilder hobby1=new StringBuilder("imooc"); System.out.println(hobby+hobby1); } }
public class HelloWorld { public static void main(String[] args) { // 创建一个StringBuilder对象,用来存储字符串 StringBuilder hobby=new StringBuilder("爱慕课"); StringBuilder hobby1=new StringBuilder("imooc"); System.out.println(hobby+hobby1); } }
2017-03-28
举报