两个字符串连接程序

题目:两个字符串连接程序

思路: 直接使用+号拼接

public class 第四十六题字符串拼接 {
    public static void main(String[] args) {
        String s1 = "hello world! ";
        String s2 = "i love you all!";
        String s3 = s1+s2;
        System.out.println(s3);
    }
}

 

posted @ 2019-05-30 23:22  何茫然zju  阅读(769)  评论(0编辑  收藏  举报