void (int minCapacity) { int oldCapacity = myData.length; if (minCapacity > oldCapacity){ int newCapacity = oldCapacity * 3 / 2 + 1; if (newCapacity < minCapacity){ newCapacity = minCapacity; } myData = ArrayUtil.realloc(myData, newCapacity); } }