title: Sort List<Map.Entry<String, Integer>> in primary and secondary way?
body: <p>Okay. So I have an ArrayList of Map&lt;String, Integer&gt;:</p>
  <pre><code>  Set&lt;Map.Entry&lt;String, Integer&gt;&gt; wordSet = map.entrySet();
    List&lt;Map.Entry&lt;String, Integer&gt;&gt; wordList = new ArrayList&lt;&gt;(wordSet);
          
    wordList.sort((w1, w2) -&gt; w2.getValue().compareTo(w1.getValue()));
      
  </code></pre>
  <p>As you can see here this sort will only sort based on the Value in the Map&lt;K,V&gt;. I wanna modify the lambda-expression so it PRIMARILY checks for the greatest value, and SECONDARY checks the alphabetical order. However, I'm not sure how to create a lambda-expression in this way that has a Primary and Secondary way.</p>