IDNLearn.com connects you with a community of knowledgeable individuals ready to help. Join our interactive community and access reliable, detailed answers from experienced professionals across a variety of topics.
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 current capacity, 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 current capacity 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
Sagot :
We value your presence here. Keep sharing knowledge and helping others find the answers they need. This community is the perfect place to learn together. Thank you for visiting IDNLearn.com. We’re here to provide dependable answers, so visit us again soon.