- import java.util.Scanner;
- public class Server {
- public static void main(String args[]) {
- Scanner s1 = new Scanner(System.in);
- String str1 = s1.next();
- Scanner s2 = new Scanner(System.in);
- String str2 = s2.next();
- Scanner s3 = new Scanner(System.in);
- String str3 = s3.next();
- Scanner s4 = new Scanner(System.in);
- String str4 = s4.next();
- String[] string = new String[]{str1, str2, str3, str4};
- String[][] str = new String[1][1];
- str[0] = string;
- for(int i = 0; i < str[0].length; i++) {
- System.out.println(str[0][i]);
- }
- }
- };
- 程序运行结果:
- aaa
- bbb
- ccc
- ddd
- aaa
- bbb
- ccc
- ddd
- 如果对照我的找不到错误,麻烦把代码贴出来。
复制代码 |