title: Can not reversed sort of ArrayList in java
body: <p>Today I would like to sort my List of Movie by rating. I use sort method like below and it works fine till I would like to make a reversed order.</p>
  
  <pre><code>List&lt;Movie&gt; result = movieRepository.findAll();
  result.sort(Comparator.comparing(m-&gt;m.getRating()));
  </code></pre>
  
  <p>That works perfect however when I try to do something like that:</p>
  
  <pre><code> List&lt;Movie&gt; result = movieRepository.findAll();
   result.sort(Comparator.comparing(m-&gt;m.getRating()).reversed());
  </code></pre>
  
  <p>It shows me that:<code>Cannot resolve method getRating()</code>. So he can resolve it until I try to make it reversed order? What is going on here?</p>