What is the default size for an arraylist in java 8? As far as I remember and searched on google, everywhere I am finding that it is 10 by default but when I am taking output of the below code, it is printing 0. Is there any changes happened in java 8 related to this?
ArrayList<String> arrList = new ArrayList<String>(); System.out.println("size:"+arrList.size());
My second query is: when I add some element to the list, then will the size increase by 1.5 times of previous size or it will increase by only 1?
PS: Is there any way to know the current capacity of the arraylist object?