public void remove(int i){
  if ((i >= array.length) || (i < 0))   throw new ArrayIndexOutOfBoundsException("invalid index:" + i + ";the array length is "+ array.length);
  NSObject[] newArray=new NSObject[array.length - 1];
  System.arraycopy(array,0,newArray,0,i);
  System.arraycopy(array,i + 1,newArray,i,array.length - i - 1);
  array=newArray;
}

public void remove ( int i ) { if ( ( i >= array . length ) || ( i < 0 ) ) throw new ArrayIndexOutOfBoundsException ( "invalid index:" + i + ";the array length is " + array . length ) ; NSObject [ ] newArray = new NSObject [ array . length - 1 ] ; System . arraycopy ( array , 0 , newArray , 0 , i ) ; System . arraycopy ( array , i + 1 , newArray , i , array . length - i - 1 ) ; array = newArray ; }
remove the i - th element from the array . the array will be resized .
