title: Comparator: Method references not supported at this language level?
body: <p>I wrote the following line of code for a <code>Java 8</code> project:</p>
  
  <pre><code>Comparator&lt;Person&gt; oldestPerson= Comparator.comparing(Person::getOldestBirthday);
  </code></pre>
  
  <p>It is a simple comparator, however I am trying to use this code In a project that only uses <code>Java 7</code>, therefore giving this error:</p>
  
  <pre><code>"Method references are not supported at this language level"
  </code></pre>
  
  <p>I understand im getting the error as im not using Java 8. Is there a simple way to re-write the logic without having to use a method reference?</p>