import java.util.*;  
class TestCollection13{  
    public static void main(String args[]){  
        HashMap<Integer,String> hm=new HashMap<Integer,String>();  
        hm.put(100,"Amit");  
        hm.put(101,"Vijay");  
        hm.put(102,"Rahul");  
        for(Map.Entry m:hm.entrySet()){  
            System.out.println(m.getKey()+" "+m.getValue());  
        }  
    }  
}  
in this above HaspMap program i can not understand the logic behind this for loop . why Map.Entry is needed and what is the function of entrySet() ?? help me regarding this please . thanks in advance
 
     
    