array=new Object[10];
}
- public Vector( int size ) {
+ public Vector(int size) {
capacityIncrement=0;
this.size=0;
array=new Object[size];
}
public Object elementAt(int index) {
- if (index<0 || index >=size) {
+ if (index<0 | index >=size) {
System.printString("Illegal Vector.elementAt\n");
System.exit(-1);
return null;
System.printString("Illegal Vector.removeElementAt\n");
System.exit(-1);
}
- removeElement(array, index);
+ removeElement(array, index, size);
size--;
array[size]=null;
}
- public static native void removeElement(Object[] array, int index);
+ public static native void removeElement(Object[] array, int index, int size);
public void removeAllElements() {
int s = size;