title: I want to delete the null elements in the array list which should decrease the size of the array
body: <p>This is my method to remove the number of null elements:</p>
  <pre><code>@Override
  public void removeAt(int index) {
      int count = 0;
      for(int i = index; i &lt; this.array.length -1; i++){
          array[i] = array[i + 1];
          if(Arrays.toString(array).contains(&quot;null&quot;)) {
              count = count + 1;
              System.out.println(&quot;the number of null it has is &quot; + count);
          }
          }
      System.out.println(Arrays.toString(array));
        }
  </code></pre>
  <p>This is my test for the removeAt method:</p>
  <pre><code>@Test
  @DisplayName(&quot;remove at index 0, then check size, went from 11 to 10&quot;)
  void t8_removeAt() { 
      MutableArray&lt;String&gt; ma = new MutableArray&lt;String&gt;();
      
      //add 11 items to the array
      for(int i = 0; i &lt; 11; i++) {
          ma.append(&quot;number_&quot; + i);
      }
      
      //delete element 0
      ma.removeAt(1);
      
      int actual = ma.size();
      int expected = 10;
      
      assertEquals(expected, actual);
  }
  </code></pre>
  <p>This is the outcome:</p>
  <pre class="lang-none prettyprint-override"><code>the number of null it has is 1
  the number of null it has is 2
  the number of null it has is 3
  the number of null it has is 4
  the number of null it has is 5
  the number of null it has is 6
  the number of null it has is 7
  the number of null it has is 8
  the number of null it has is 9
  the number of null it has is 10
  the number of null it has is 11
  the number of null it has is 12
  the number of null it has is 13
  the number of null it has is 14
  the number of null it has is 15
  the number of null it has is 16
  the number of null it has is 17
  the number of null it has is 18
  [number_0, number_2, number_3, number_4, number_5, number_6, number_7, number_8, number_9, number_10, null, null, null, null, null, null, null, null, null, null]
  </code></pre>