mark donner wrote:How do you create an array list?
I read that the array list initializes with a value of 10. Is this true?
thanks
Mark, you can find the JavaDoc for ArrayList
here.
ArrayList is a concrete implementation of the List interface, so if you want to follow best practices, you would probably want to do something like this:
where Type is a class type (that is, a non-primitive).
To answer your second question, yes, unless you specify a different initial capacity, an ArrayList will have the default initial capacity of 10.
John.