Set<String> keySet,这时ketSet里面的元素全部变成String类型吗
public void testKeySet(){ Set<String > keySet = student.keySet(); //此时的keySet是字符串类型???那键值对呢,学生对应课程怎么算呢? System.out.println("总共有:"+student.size()+"个学生!"); for (String stuId:keySet){ Student st = student.get(stuId); if (st != null) System.out.println("学生:"+st.name); } }