Question: please provide java code for it. /x * Ensures that the capacity of the underlying array is ot leost (acode ainCapacity). If not, the underlying
/x * Ensures that the capacity of the underlying array is ot leost (acode ainCapacity). If not, the underlying array * witl be reploced with a new orroy whose copocity is aither \{@rede mincopocity\} or double the current copacity + 1 * (whichever is targer). * V16eo: 7 ? * Qeoran minCopocity ainimun copocity of the underlying orroy *f private void ensureCapacity(int minCapacity) f if (eDteentData. Length =e mincapacity) f int curcent = elenentData, tength; curcent =( int ) (current 1.5); E[] newList = (E(1) new object [cureent]; for (int 1=0;1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
