testModify中的代码这么写可以么,运行出来没有问题
public void testModify() {
Scanner input = new Scanner(System.in);
System.out.print("输入要修改的学生ID:");
while(true) {
String ID = input.next();
Student st= students.get(ID);
if(st==null) {
System.out.print("该ID不存在,请重新输入:");
continue;
}else {
System.out.println("当前该ID所对应的学生为:"+st.name);
System.out.print("请输入学生姓名:");
String name = input.next();
st.name = name;
break;
}
}