title: why do we use entrySet() method and use the returned set to iterate a map?
body: <p>Usually we write this to get the keys and values from a map.</p>
  
  <pre><code>Map m=new HashMap();
  Set s=map.entrySet();
  Iterator i=s.iterator()
  while(s.hasNext()){
      Map.Entry m= (map.Entry) s.next();
      System.out.println(""+m.getKey()+""+ m.getValue());
  }
  </code></pre>
  
  <p>Why do we iterate using a set why not directly map?</p>