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)); }
添加回答
举报
0/150
提交
取消