Home » JAVA Programming » Collections » Question
  1. Which of these method is used to reduce the capacity of an ArrayList object?
    1. trimTosize()
    2. trimToSize()
    3. trimSize()
    4. trim()
    5. None of these
Correct Option: B

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



Your comments will be displayed only after manual approval.