public static void main(String[] args) {
Map<String,String> map = new HashMap<String,String>();
map.put("k1", "v1");
map.put("k2", "v2");
map.put("k3", "v3");
Set set = map.entrySet();
Iterator it =set.iterator();
while(it.hasNext())
{
Map.Entry me=it.next();
System.out.println(me.getKey()+" "+me.getValue());