title: How to sort LocalDateTime and get Max and min?
body: <p>Can anyone share the logic to sort the LocalDateTime and get max and min record from list of domain object.</p>
  
  <p><strong>Domain Object-</strong></p>
  
  <pre><code>private int employeeNumber;
  private LocalDateTime updatedDate;
  </code></pre>
  
  <p>First Record</p>
  
  <pre><code>1.1,2016-07-09 00:00:00+0000
  2.2,2017-10-06 23:25:37+0000
  </code></pre>
  
  <p><strong>Max Output</strong>: 2,2017-10-06 23:25:37+0000</p>
  
  <p><strong>Min Output</strong>: 1,2016-07-09 00:00:00+0000</p>