title: How to add element to next free space in an array?
body: <p>I'm trying to find a way to add an element to an array without knowing where to add it. E.g. Instead of doing something like this...</p>
  
  <pre><code>double[] myArray = new double[10];
  myArray[5] = 1.0;
  </code></pre>
  
  <p>I want to be able to just add an element to the next available free space. Is this even possible in java? Sorry if it's a simple question, I'm pretty new to the language.</p>