集合接口的常用方法: 1.List接口 public class Jihe { public static void main(String[] args) { ArrayList<String> array = new ArrayList<String>(); for(int i =1;i<10;i++){ array.add("学习天数:"+new Integer(i).toString() ); } array.add("练习ArrayLi…
ArrayList是java的动态数组,底层是基于数组实现. 1. 成员变量 public class ArrayList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, java.io.Serializable { /** * The maximum size of array to allocate. * Some VMs reserve some header word…