title: number of items in the second list that aren't in the first list in java
body: <p>Let's say my first list is:</p>
  
  <p><code>[{tenancyNumber:777,no:1}, {tenancyNumber:888,no:2}, {tenancyNumber:999,no:3}]</code></p>
  
  <p>And my second List is</p>
  
  <p><code>[{tenancyNumber:444,no:4}, {tenancyNumber:999,no:5}, {tenancyNumber:666,no:6}]</code></p>
  
  <p>So, if we compare by name in the two lists there are 2 objects in the second list which are not in the first list. How to find out this in Java?</p>
  
  <p><strong>This is what i tried:</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>final Long newAccounts = endDateData.stream()
    .map(TenancyHistory::getTenancyNumber)
    .filter(startDateData.stream().map(TenancyHistory::getTenancyNumber)::equals)
    .count();
  </code></pre>
  
  <p>which is throwing an error</p>
  
  <blockquote>
    <p>[PredicateIncompatibleType] Predicate will always evaluate to false
    because types Stream and Long are incompatible</p>
  </blockquote>