标准学生类
private String name;
private int age;
private String gender;
测试类
public static void main(String[] args) {
ArrayList<Student> array = new ArrayList<>();
Scanner sc = new Scanner(System.in);
//循环键盘录入5个学生信息
while (array.size()<5){
String s = sc.nextLine();
int i = sc.nextInt();
String s1 = sc.nextLine();
Student stu = new Student(s,i,s1);
}
}