Computer Science, asked by Russy8434, 1 year ago

Which of these method can be used to increase the capacity of arraylist object manually?

Answers

Answered by gopz75
0

Answer:

When we add an element, the capacity of ArrayList object increases automatically, but we can increase it manually to specified length x by using function ensureCapacity(x); ... Explanation: trimTosize() is used to reduce the size of the array that underlines an ArrayList object.

Similar questions