title: Sorting multiple attribute with Lambda Expressions
body: <p>This is my list:</p>
  
  <pre><code>Name: Ben     || Age: 5 || Group: 1
  Name: Andy    || Age: 6 || Group: 2
  Name: Charlie || Age: 6 || Group: 2
  Name: Ben     || Age: 5 || Group: 1
  Name: Andy    || Age: 5 || Group: 2
  Name: Charlie || Age: 5 || Group: 1
  </code></pre>
  
  <p>I want to sort the list by <code>Group</code>, if <code>Group</code> is equal then by <code>Age</code>, and if <code>Age</code> is equal then by <code>Name</code>. But so far I can only sort by one attribute, using Lambda Expressions:</p>
  
  <pre><code>list.sort((Object o1, Object o2) -&gt; o1.getGroup().compareTo(o2.getGroup()));
  </code></pre>
  
  <p>If I try</p>
  
  <pre><code>o1.getGroup().compareTo(o2.getGroup()) &amp;&amp; o1.getAge().compareTo(o2.getAge())
  </code></pre>
  
  <p>it's turned out error...</p>