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

思路: 直接使用+号拼接

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);
    }
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-12
  • 2021-09-15
  • 2021-12-13
  • 2021-06-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案