map的输出

map的输出

        Set<Entry<String,student>> entrySet = map.entrySet();
        Iterator<Entry<String, student>> it2 = entrySet.iterator();
        while(it2.hasNext()){
            Entry<String, student> entry = it2.next();
            String ID = entry.getKey();
            student stu = entry.getValue();
            System.out.println(ID+" "+stu);
        }

猜你喜欢

转载自www.cnblogs.com/yunianzeng/p/11980071.html