public int indexOf(int value) { int index = -1; for (int i = 0; i < size; i++) { if (elementData[i] == value) { index = i; } } return index; }