Use ArrayList Constructor...
hi! I have been looking at the source code for the ArrayList class, and I found a constructor that allows you to make an ArrayList of a given length,
(source code for ArrayList class) Docjar: java/util/ArrayList.java
ArrayList test = new ArrayList(int length);
But whenever I try to use this constructor, a normal ArrayList is made, not the one with a length of 42 that I want.
So my question is: Does this constructor actually work?
I'd gladly use an array, but using an ArrayList is part of my assignment.