title: How to check if exists any duplicate in Java 8 Streams?
body: <p>In java 8, what's the best way to check if a List contains any duplicate?</p>
  
  <p>My idea was something like:</p>
  
  <pre><code>list.size() != list.stream().distinct().count()
  </code></pre>
  
  <p>Is it the best way?</p>