for(i=0;i<count;i++){
System.out.print("请输入姓名:");
sj.setName(sc.next());
System.out.print("请输入年龄:");
sj.setAge(sc.nextInt());
System.out.print("请输入成绩:");
sj.setGrade(sc.nextDouble());
list.add(sj);
}
for (int j = 0; j < list.size(); j++) {
System.out.println(list.get(j));
}
慕斯卡409589
leeo_may
chaosbead
相关分类