特点
- 存储的元素有序可重复
- ArrayList built atop an array, which is able to dynamically grow and shrink as you add/remove elements.
This ArrayListhas the following properties:
- Random access takes O(1) time(支持高效的随机元素访问)
- Adding element takes amortized constant time O(1)
- Inserting/Deleting takes O(n) time
- Searching takes O(n) time for unsorted array and O(log n) for a sorted one