title: Reverse order of LinkedHashMap to LinkedHashMap or ArrayList
body: <p>I have a <code>LinkedHashMap&lt;String,String&gt;</code> which looks something like this (don't really know how to illustrate a HashMap):</p>
  
  <pre><code>{
    "10/10/2010 10:10:10" =&gt; "SomeText1",
    "10/10/2019 10:10:19" =&gt; "SomeText2",
    "10/10/2020 10:10:20" =&gt; "SomeText3",
    "10/10/2021 10:10:21" =&gt; "SomeText4"
  }
  </code></pre>
  
  <p>And I want to put it like this:</p>
  
  <pre><code>{
    "10/10/2021 10:10:21" =&gt; "SomeText4",
    "10/10/2020 10:10:20" =&gt; "SomeText3",
    "10/10/2019 10:10:19" =&gt; "SomeText2",
    "10/10/2010 10:10:10" =&gt; "SomeText1"
  }
  </code></pre>
  
  <p>I have written this solution which works because the result I want is an ArrayList, but i was thinking if there was an easier way to reverse the LinkedHashMap maintaining the same type using a tool like <strong>sort</strong> for example.</p>
  
  <pre><code>private LinkedHashMap&lt;String, String&gt; map = new LinkedHashMap&lt;&gt;();
  int sizeOfHashMap = map.size();
  ArrayList reversedHashToArrayList = new ArrayList(map.size());
     for (Map.Entry&lt;String,String&gt; entry : map.entrySet()) {
     String key = entry.getKey();
     String value = entry.getValue();
  
     reversedHashToArrayList.add(0,entry);
  }
  </code></pre>