Wednesday, April 3, 2019

How to add Initial Capacity to ArrayList

We can add initial capacity to arraylist like this

List list = new ArrayList(new String[10].length + 5);

No comments:

Post a Comment