What is the difference between ArrayList al = new ArrayList(); and ArrayList al = new ArrayList(0)?
ArrayList(0)
Empty list with the specified initial capacity. Hense none for 0
ArrayList()
Empty list with an initial capacity of ten.
Please read the following: http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html
2.1m questions
2.1m answers
60 comments
57.0k users