myarraylist this concrete class will store its elements in an array of object. the initial capacity of this array will be 8 elements. since an array is a fixed size structure, you may need to allocate a new array with increased capacity in order to accommodate adding new elements. for this purpose you must implement the makecapacity method. makecapacity method this method will take a mincapacity as an int argument. if mincapacity is less than current size or equal to the currentcapacity, then this method should take no action. otherwise the capacity of this myarraylist must be changed to either 8 or mincapacity (whichever is greater). if currentcapacity is to be changed, then this method will allocate a new array of object sized to the new capacity then copy over all elements from the old array to the new array then store the new array in the private storage variable for this instance



Answer :

Other Questions