通过+(字符串串联)运算符进行字符串串联。

2023年12月20日12:56:55

可以使用Java的“ +”运算符来连接字符串。

示例

public class Test {
   public static void main(String args[]){
      String st1 = "Hello";
      String st2 = "How";
      String st3 = "You";
      String res = st1+st2+st3;
      System.out.println(res);
   }
}

输出结果

HelloHowYou

  • 更新时间:2023年12月20日12:56:55 ,共 243 字。