Question: The java.util.ArrayList includes a method, trimToSize( ), that replaces the underlying array with one whose capacity precisely equals the number of elements currently in the
The java.util.ArrayList includes a method, trimToSize( ), that replaces the underlying array with one whose capacity precisely equals the number of elements currently in the list. Implement such a method for our dynamic version of the ArrayList class from Section 7.2.
Step by Step Solution
3.55 Rating (172 Votes )
There are 3 Steps involved in it
public void ... View full answer
Get step-by-step solutions from verified subject matter experts
