當前位置:成語大全網 - 新華字典 - java哈希表

java哈希表

1:Map<Integer,Vector<Course>> stu_cour=new HashTable()<Integer,Vector<Course>>;

2:Map<Integer,Vector<Student>> cour_stu=new HashTable()<Integer,Vector<Student>>;

3:stu_cour.put(1,"yunwen") cour_stu.put(1,"zhangsan")

4:for(Vector v:stu_cour){

system.out.prinln(v.getCourseName)

}

5:

for(Vector v:cour_stu){

system.out.prinln(v.getStudentName)

}