1). ArrayList
? ArrayList maintains an array of objects. If new ArrayList () is called, it defaults to an array of size=10.
? Each add operation checks the array capacity, if not enough, re-sets a new array with an initial capacity of 1.5 times times the size, and then copy each element past.
? To insert or delete in the middle of an array, move all subsequent elements. (using System.arraycopy ())
2). Lindedlist
The implementation of LinkedList is a doubly linked list. Each node contains a forward, backward pointer in addition to the element.
3). HashMap
The structure of the hashmap is a hash bucket
4). Linkedhashmap
Linkedhashmap is a subclass of HashMap that adds a doubly linked list to store each newly added node. When traversing, in the order of the linked list. In fact, the above HashMap and linkedlist the same.
Data structure of the Java main collection class