Which of these method is used to reduce the capacity of an ArrayList object?
A. trim()
B. trimSize()
C. trimTosize()
D. trimToSize()
Answer:A
Which of these method is used to reduce the capacity of an ArrayList object?
A. trim() B. trimSize() C. trimTosize() D. trimToSize()
Explanation: trimTosize() is used to reduce the size of the array that underlines an ArrayList object.