[AppleScript] 纯文本查看 复制代码
class Student7{ }
public class Test7 {
public static void main(String[] args) {
ArrayList<Student7>list = new ArrayList<>();
Scanner s = new Scanner(System.in);
for (int i = 1; i <= 5; i++) {
System.out.println("请输入第"+i+"个学员信息:");
System.out.println("请输入姓名:");
String s1 = s.next();
System.out.println("请输入成绩:");
int i1 = s.nextInt();
Student7 stu1= new Student7(s1,i1);
list.add(stu1);
} [/size][/font][/align][align=left][font=微软雅黑][size=3]System.out.println(list);
}
}