一.String类

1.字符串拼接

1         String str1 = "abcd";
2         String str2 = "efgh";
3         System.out.println(str1 + str2);        // 用 +  abcdefgh
4 
5         System.out.println(str1.concat(str2));  // 用 concat() 方法  abcdefgh
View Code

相关文章:

  • 2021-10-04
  • 2021-07-28
  • 2021-09-14
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2023-03-13
  • 2022-12-29
  • 2022-12-23
  • 2023-03-10
相关资源
相似解决方案