title: Intersection of Two Lists Objects in java 8
body: <p>An intersection of Two Lists Objects in java 8. Can some tell me what am I doing wrong?</p>
  
  <pre><code>List&lt;Student&gt; originalStudent = new ArrayList&lt;&gt;();
  List&lt;Student&gt; newStudent = new ArrayList&lt;&gt;();
  
  List&lt;Student&gt; intersectListStudent = new LinkedList&lt;&gt;()
  
  originalStudent.add(new Student("William", "Tyndale",1));
  originalStudent.add(new Student("Jonathan", "Edwards",2));
  originalStudent.add(new Student("Martin", "Luther"),3);
  
  newStudent.add(new Student("Jonathan", "Edwards",2));
  newStudent.add(new Student("James", "Tyndale",4));
  newStudent.add(new Student("Roger", "Moore",5));
  
  
  originalStudent.forEach(n -&gt;
          newStudent.stream()
                  .filter(db -&gt; !n.getName().equals(db.getName()) &amp;&amp;
                          !n.getLastName().equals(db.getLastName()))
                      .forEach(student-&gt; intersectListStudent .add(student)));
  </code></pre>