学习记录28
将一个字符串加在另一个字符串末尾并覆盖
public class StringConcatenationWithPlus {
public static void main(String[] args) {
String str1 = "Hello";
String str2 = " World";
// 使用 + 运算符拼接字符串并覆盖 str1
str1 = str1 + str2;
System.out.println("拼接并覆盖后的字符串: " + str1);
}
}

浙公网安备 33010602011771号