import java.util.Scanner;
public class DianMing {
public static void main(String[] args) {
String[] names = new String[3];
Scanner sc = new Scanner(System.in);
System.out.println("请输入学生的姓名:");
names[0] = sc.nextLine();
names[1] = sc.nextLine();
names[2] = sc.nextLine();
System.out.println("输入完毕");
bian(names);
}
public static void bian(String[] names) {
for(int i = 0;i < names.length;i++) {
System.out.println(names[i]);
}
}
}
|
|