Arraylist中set(index,object)与add(index,object)方法的区别

set:将原来index位置上的object的替换掉

add:将原来index位置上的向后移动