今天用到了,发现不会,随手谷歌之,整理如下。
//Map是接口,刚才在那new Map,汗颜Map<Character,Integer> mm = new HashMap();//Iterator也是接口Iterator<Character> iter = mm.keySet().iterator();while(iter.hasNext()) {char key = iter.next();//do sth}
2024-04-12 11:07:56
今天用到了,发现不会,随手谷歌之,整理如下。
//Map是接口,刚才在那new Map,汗颜Map<Character,Integer> mm = new HashMap();//Iterator也是接口Iterator<Character> iter = mm.keySet().iterator();while(iter.hasNext()) {char key = iter.next();//do sth}