title: Is it possible to use Collections.removeAll() by also passing self-defined equals() method in Java?
body: <p>Consider I have a Java object <code>Student</code> only with getters and setters that I cannot change, and two Lists – <code>students1</code> and <code>students2</code> – both of type <code>ArrayList&lt;Student&gt;</code>.</p>
  
  <p>How can I call <code>students1.removeAll(students2)</code> by passing my own <code>equals()</code> method?</p>
  
  <p>This is because I cannot modify the <code>Student</code> class.</p>