Computer Science, asked by akshatkaushik6873, 1 year ago

What does the method trimToSize() do in java?

Answers

Answered by PiyushSinghRajput1
2

ArrayList trimToSize() in Java with example. The trimToSize() method of ArrayList in Java trims the capacity of an ArrayList instance to be the list's current size. This method is used to trim an ArrayList instance to the number of elements it contains. Return Value: It does not returns any value.

Answered by DynamicPlayer
1

Explanation:

Python is a general-purpose coding language—which means that, unlike HTML, CSS, and JavaScript, it can be used for other types of programming and software development besides web development. That includes back end development, software development, data science and writing system scripts among other things...... !! .......

Similar questions