-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8, 11, 17
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
Quoting from the ArrayList documentation:
"Each ArrayList instance has a capacity. The capacity is the size of the array used to store the elements in the list."
The documentation for the empty constructor goes on to say:
"Constructs an empty list with an initial capacity of ten"
This is misleading, as the empty constructor creates an empty list with a capacity (according to the above definition of capacity) of zero.
I suggest changing the wording to simply state:
"Constructs an empty list"
Or alternatively, fully specifying the behaviour of ArrayList with respect to allocating the underlying array, which I think is not the best option.
FREQUENCY : always
Quoting from the ArrayList documentation:
"Each ArrayList instance has a capacity. The capacity is the size of the array used to store the elements in the list."
The documentation for the empty constructor goes on to say:
"Constructs an empty list with an initial capacity of ten"
This is misleading, as the empty constructor creates an empty list with a capacity (according to the above definition of capacity) of zero.
I suggest changing the wording to simply state:
"Constructs an empty list"
Or alternatively, fully specifying the behaviour of ArrayList with respect to allocating the underlying array, which I think is not the best option.
FREQUENCY : always
- duplicates
-
JDK-8143020 no-arg ArrayList constructor specification has confusing wording about capacity
-
- Open
-