Provide code that shrinks an array when the percentage of array cells actually in use falls below the constant SHRINK_THRESHOLD. Use the code for expanding an array from Section 3.2.2 as a model. Assume the name of the array is array and the new array will have length SHRINK_THRESHOLD.
What will be an ideal response?
```
Object[]temp = new Object[SHRINK_THRESHOLD];
System.arraycopy( temp, 0, array, 0, numElements );
array = temp;
```
Computer Science & Information Technology
You might also like to view...
Links to sections are known as ____ links.
A. indexed B. key C. function D. bookmark
Computer Science & Information Technology
The ____ Tool is suited for larger areas such as tears or wrinkles.
a. Large Area Brush b. Healing Brush c. Global Brush d. Blending Brush
Computer Science & Information Technology
Grayscale is useful to see how a chart will look when printed on a black and white printer
Indicate whether the statement is true or false
Computer Science & Information Technology
The theme layouts determine where the text and content placeholders display on the slide._________________________
Answer the following statement true (T) or false (F)
Computer Science & Information Technology