title: Why is data.entrySet().iterator() ordered in a different order, compared to the HashMap<Long, String> data?
body: <p>I have input data (Timestamp, Json string) which I store in a <code>HashMap&lt;Long, String&gt;</code>. To process the JSON string I use an iterator. </p>
  
  <p>I use <code>Iterator&lt;Entry&lt;Long, String&gt;&gt; it = data.entrySet().iterator();</code> to get the entrySet as iterator.</p>
  
  <p>My problem is now that the HashMap is organized as follows:</p>
  
  <pre><code> 123,{String1} 
   124,{String2} 
   125,{String3}
  </code></pre>
  
  <p>Better expressed: I add A to the HashMap, Z to the HashMap, E to the HashMap, I to the HashMap. I expect the order A, Z, E, I and I want the same order in the iterator. </p>
  
  <p>If I put it in an iterator I get:</p>
  
  <pre><code>124, {String2}
  123, {String1}
  125, {String3}
  </code></pre>
  
  <p>The order of the itarator is different from the HashMap order. For me the order of the iterator has to be exactly the same as the order of the HashMap. What I'm doing wrong, that the iterator is changing the order of the data?</p>