title: How do you limit the size of an ArrayList?
body: <p>I am trying to create an empty ADT Bag that can hold up to 100 items.</p>
  <pre><code>public class ListArrayListBased implements ListInterface {
  
     private ArrayList&lt;Object&gt; data;
  
     public ListArrayListBased() {
          this.data = new ArrayList&lt;Object&gt;();
  </code></pre>
  <p>How do I make an ArrayList limited to 100 objects?</p>