|
HashMap is not comparable to the other three.
AL, LL, V are all List,
AL and V are based on dynamic arrays, and LL is based on (bidirectional) linked lists, so LL is more suitable for frequent insertion and deletion operations
The methods of AL and LL are not synchronized, while V is synchronized
Since LL is a linked list, there is no such problem as initial size and expansion strategy
The initial size can be specified in the constructors of AL and V, and the default is 10 (so you should specify in advance when you can determine the approximate range of the number of things you want to put, to avoid multiple reallocations)
When AL needs to be expanded * 1.5, and V defaults * 2, and V can be specified to become larger each time, such as 10 expansion each time, rather than double
The constructors of the three, and the addAll method can help convert between each other to improve performance in large batch operations at different stages
V is relatively old and belongs to the veteran of the JDK. As early as JDK 1.0 before java.util.Collection / List appeared, it was there. So in some cases, for example, the Applet is also used under the MS VM, you can only use Vector |
|