⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: ‘Decompress current Excalidraw file’. For more info check in plugin settings under ‘Saving’
Excalidraw Data
Text Elements
public E remove(int index){
if(index < 0 || index > size - 1)
throw new IndexOutOfBoundsException(“删除位置非法”);
E e = (E) array[index];
for (int i = index; i < size; i++)
array[i] = array[i + 1];
size—;
return e;
}
0
1
2
111
222
333
333
333
111
0
1
2
index=1
取出 Integer i = array[1]
size=3
i=1
arr[1]=arr[2]
444
333
111
0
1
2
i=2
arr[2]=arr[3]
…
444
3