title: If i have an empty arraylist, can i add an element in any position or do i have to start off with the 0 index?
body: <p>I have used this code but i am getting an INdexOutOfBoundsException</p>
  <pre><code>ArrayList&lt;String&gt; list1 = new ArrayList&lt;String&gt;();
  
  list1.add(7,&quot;A&quot;);
  </code></pre>