Sail E0 Webinar
Question
Which of these method is used to reduce the capacity of an ArrayList object?
Options:
A .  trim()
B .  trimSize()
C .  trimTosize()
D .  trimToSize()
Answer: Option D


trimTosize() is used to reduce the size of the array that underlines an ArrayList object.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers