public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
Students1[] stus = new Students1[3];
Students1Biz biz = new Students1Biz();
Students1 stu1 = new Students1();
stu1.score = 96;
Students1 stu2 = new Students1();
stu2.score = 56;
Students1 stu3 = new Students1();
stu3.score = 78;
stus[0] = stu1;
stus[1] = stu2;
stus[2] = stu3;
/*
for (int i = 0; i < stus.length; i++) {
System.out.println("请输入" + (i + 1) + "个学员的成绩:");
stu[i].score = scanner.nextInt();
}
*/
biz.seaScore(stus);
}
为什么stu[i].score = scanner.nextInt();
不能接受输入数据 报空指针异常