title: Insertion in HashMap not working properly
body: <p>I am inserting a sorted object into a HashMap but its not getting sorted.</p>
  
  <pre><code>Map&lt;Long, Object&gt; sortedObject = new HashMap(Long, Object&gt;();    
  for(Object sortedObject : sortedObjectList)
      {
        sortedMap.put(sortedObject.getId(), sortedObject);
      }
  
      syso(new Gson().toJson(sortedMap);
  </code></pre>
  
  <p>In output I was expecting sorted map, but its random.
  Please help.</p>