编写一个Java程序实现字符串的连接
时间: 2023-05-25 14:06:56 浏览: 99
python 实现连接字符串
5星 · 资源好评率100%
public class StringConnect {
public static void main(String[] args) {
String str1 = "Hello";
String str2 = "world";
String str3 = str1.concat(str2);
System.out.println("Concatenated String: " + str3);
}
}
// Output: Concatenated String: Helloworld
阅读全文