MapでIteratorを使用する良い方法
private void print(){ Map<String, String> map = new HashMap<String, String>(); map.put("aaa", "1"); for (Iterator it = map.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry)it.next(); System.out.println(entry.getKey()); System.out.println(entry.getValue()); } }