title: How to sort the month in Map Hashmap Java
body: <p>I got trouble when put month as key on Java hashmap.
  Can someone help me?</p>
  <p>I want to display :
  {January=0.0, February=0.0, March=0.0, April=0.0}</p>
  <p>But, the result from the code is :
  {March=0.0, January=0.0, February=0.0, April=0.0}</p>
  <p>This is my code..</p>
  <pre><code>import java.util.HashMap;
  
  public class Main {
    public static void main(String[] args) {
      HashMap&lt;String, Double&gt; capitalCities = new HashMap&lt;String,Double&gt;();
      capitalCities.put(&quot;January&quot;, 0.0);
      capitalCities.put(&quot;February&quot;, 0.0);
      capitalCities.put(&quot;March&quot;, 0.0);
      capitalCities.put(&quot;April&quot;, 0.0);
      System.out.println(capitalCities); 
    }
  }
  </code></pre>
  <p>I'm so struggling about it, please help</p>