title: HashSet vs. ArrayList
body: <p>So I have a custom class Class that will have a set of another custom class Students. So it will look something like this:</p>
  
  <pre><code>public class Class {
      private Set&lt;Student&gt; students;
  
      // other methods
  }
  </code></pre>
  
  <p>Now I will be adding and removing many students to the set students and i will also be changing many of the private fields of a student already in the set of students. </p>
  
  <p>QUESTION: What data structure should I use to best implement this? Since I will be changing the property of the Student objects in set student (thereby changing the hashcodes) should I use an ArrayList instead?</p>