title: memory usage of ArrayList<Integer>
body: <p>I’m using <code>ArrayList&lt;Integer&gt;</code> in my research project. I need to keep unknown number of integers in this list. Sometimes I need to update the list: remove existing records or add new records. As <code>Integer</code> is an object, it’s taking much more memory than only <code>int</code>. Is there any alternate way to maintain the list that will consume less memory than <code>Integer</code>?</p>