import java.util.Scanner;
public class Example01 {
//循环从键盘接收5个字符串,并连接成一个字符串。
public static void main(String[] args) {
Scanner num = new Scanner(System.in);
StringBuilder string = new StringBuilder(new String());
for (int i = 0; i < 5; i++) {
System.out.print("请输入第" + (i + 1) + "个字符串:");
string.append(num.next());
}
System.out.println("连接后的字符串为:" + string);//打印输出字符串
}
}