这里的students.get(ID).name可以替换成st.name吗?为啥?
Student st=students.get(ID);
if(st==null){
/**
* 提示输入学生姓名,并创建对象保存学生的ID和姓名,
* 将其添加到集合students中
*/
System.out.println("请输入学生姓名:");
String name= input.next();
//创建新的学生对象
Student newStudent=new Student(ID,name);
//通过调用students的put方法,添加ID-学生映射关系
students.put(ID, newStudent);
System.out.println("成功添加学生:"+students.get(ID).name);