int[] array; int index; int arrayIndex; int loop;   array = new int[sizes.length + length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { for (loop = 0; loop < length; loop++) { array[arrayIndex] = value; arrayIndex++; } } else { array[arrayIndex] = sizes[index]; arrayIndex++; } }
int[] newSizes = new int[sizes.length + length]; System.arraycopy(sizes, 0, newSizes, 0, start); for (int i = start; i < start + length; i++) newSizes[i] = value; System.arraycopy(sizes, start, newSizes, start + length, sizes.length - start); sizes = newSizes;
  public void insertEntries(int start, int length, int value)  {    int[] array;    int index;    int arrayIndex;    int loop;    // Create new array.    array = new int[sizes.length + length];    arrayIndex = 0;    for (index = 0; index < sizes.length; index++)      {        if (index == start)          {            for (loop = 0; loop < length; loop++)              {                array[arrayIndex] = value;                arrayIndex++;              }          }        else          {            array[arrayIndex] = sizes[index];            arrayIndex++;          }      }	}