1 package javaApplication; 2 import java.util.Scanner; 3 class Person 4 { 5 private String name; 6 private char sex; 7 private int age; 8 private String idnum; 9 public Person(String name,char sex,int age,String idnum)10 {11 this.name=name;12 this.sex=sex;13 this.age=age;14 this.idnum=idnum;15 }16 public void OutputInformation()17 {18 System.out.println(name+", "+sex+", "+age+", "+idnum);19 20 }21 }22 public class TsetPerson23 {24 public static void main(String[] args)25 {26 Scanner scanner=new Scanner(System.in);27 System.out.print("请输入录入学生信息的个数:");28 int studentnum=scanner.nextInt();29 Person stu[]=new Person[studentnum];30 System.out.println("请录入学生信息");31 for(int i=0;i