public void removeItem(ItemBasic item) { int i = 0; for (i = 0; i < itemCount; i++) { if (array[i] == item) { break; } } while (i <= itemCount - 1) { array[i] = array[i + 1]; i++; } itemCount--; }
public void putItem(ItemBasic item) { array[itemCount++] = item; }