for the following line what are legal
Map<Integer,
String> map=new HashMap<Integer,String>
what are legal
1. for(Map.Entry pairs :map.entrySet()){}
2. Iterator i=map.entrySet().iterator();
3. Iterator i=map.iterator();
4. Iterator<Map.Entry<Integer,String>> i=map.entrySet().iterator();
5. Iterator<Map.Entry> i=map.entrySet().iterator
in the question i couldn't understand anything and i am totally blank
can any one please guide me regarding the each answer and state
why it is legal or illegal
Please do help me in this regard and thanks in advance