Why is the default capacity of ArrayList 10?
The ArrayList is simple growing array. When trying to add element, and the buffer size is exceeded, it is simply growing. So the initial size can be any positive value. The 1 would be too little. Even with a few elements we will have a few resize operations. The 100 would be a loss of … Read more