1 线程不安全体现
addAll方法,会先确定容量,不足会扩容,然后再执行native systemarray.copy ---------扩容方法非同步方法
2 多线程下的问题
下标越界
存入的值变为null
3 解决方法
同步方法调用
Collections.syschronizedList代替arrayList
Vector 代替arrayList
CopyOnWriteArrayList代替arrayList