package com.test.map;
import java.util.Map;
import java.util.Set;
import java.util.HashMap;
import java.util.Iterator;
public class TestDemo {
public static void main(String[] args) {
Map<String,Integer> map = new HashMap<String,Integer>();
map.put("one", 1);
map.put("two", 2);
map.put("three", 3);
Set<Map.Entry<String, Integer>> set = map.entrySet();
Iterator<Map.Entry<String, Integer>> iter = set.iterator();
while(iter.hasNext()){
Map.Entry<String, Integer> me = iter.next();
System.out.println(me.getKey()+"="+me.getValue());
}
}
}