Most efficient way to remove an element from an array, then reduce the size of the array
<p>Say I have an array of 10 elements. Another part of my program determines I must remove the item at index 4.   </p>

<p>What is the most efficient method to remove the item and shorten the array? </p>

<p>I wrote the following method, however it does not seem to work properly. Am I missing something, for example if the index to remove is 0? The method is called by sending an array and the index to be removed.</p>

<p>I realize there are Array Lists and other types of lists. However this is an assignment for a programming course and MUST use ARRAYs.</p>

<pre><code>//Removes the index from the array and returns the array.
    NumberTile[] removeAndTrim(NumberTile[] array, int index){
        NumberTile[] save = array;
        array = new NumberTile[save.length-1];
        for (int i=0; i&lt;index; i++){
            array[i]=save[i];
        }//end for loop
        for (int j=index; j&lt;save.length-1; j++){
            array[j]=save[(j+1)];
        }
        return array;
    }//end removeAndTrim
</code></pre>
