title: How to get the first key of a hashmap?
body: <p>I have the following <code>HashMap&lt;String, Double&gt; map = new HashMap&lt;String, Double&gt;();</code></p>
  
  <p>How can i get the first key without iterating over it like this:</p>
  
  <pre><code>Iterator it = map.entrySet().iterator();
  while (it.hasNext()) {
      Map.Entry pair = (Map.Entry)it.next();
      System.out.println(pair.getKey() + " = " + pair.getValue());
      it.remove(); 
  }
  </code></pre>
  
  <p>Thanks</p>