A much simpler solution is just to use a Vector instead of an array. Then, yes, if you do 'vector.removeElementAt(2);', afterwards the elements at 3 upwards are moved to being at 2 upwards. (Actually, the Vector's implementation has done a System.arraycopy just as above).
i am using this method as described above, but when i call remove element some of the 5 sprites (DROIDS) crash and the sprite stays on the screen!?
monkey = new Monkey(this);
layerManager.append(monkey);
//DROIDS
for (int i = 0; i < NUM_DROID; ++i)
{
try{
System.out.println(NUM_DROID);
Droid newDroid = new Droid(this);
layerManager.append(newDroid);
droid.addElement(newDroid);
}
catch(IllegalArgumentException e)
{System.out.println("Error" + e);
}
}
any ideas as to what else may be necessery to handle this implementation?
many thanks!