首页>代码>java对象ArrayList和LinkedList的源码解析及其基本增删改查功能的实现(优化版本)>/collection/src/com/jackie/collection/arraylist/Test.java
package com.jackie.collection.arraylist; public class Test { public static void main(String[] args) { MyArrayList list = new MyArrayList(); System.out.println(list.size()); list.add("1111"); list.add("2222"); list.add("1111"); list.add("2222"); list.add("1111"); list.add("2222"); list.insert(3, "aaaa"); // list.remove(1); // list.setObj(1, "BBBB"); System.out.println(list.size()); // System.out.println(list.getObj(0)); // System.out.println(list.getObj(1)); // System.out.println(list.getObj(2)); System.out.println(list.getAll()); } }
最近下载更多