第17章(中)--集合

1.ArrayList底层结构和源码分析

      ArrayList的全面说明

 

1)      Resizable-array implementation of the List interface [ArrayList实现了List的接口,底层是一个数组,并实现可变的功能.]
ArrayList 属性 : transient Object[] elementData;

2)      Implements all optional list operations [ArrayList实现了List所有的操作。

3)      permits all elements, including null [ArrayList 可以添加任意的元素,包括null]

4)      this class provides methods to manipulate the size of the array that is used internally to store the list[ArrayList的数据是保存到array ]

5)      This class is roughly equivalent to Vector, except that it is unsynchronized [ArrayList 和Vector基本相同,除了Vector是线程同步的,ArrayList不是线程同步.]

 

猜你喜欢

转载自www.cnblogs.com/-xuewuzhijing-/p/13187062.html