摘要: import java.util.ArrayList;import java.util.List; import org.junit.Test; public class TestList { //ArrayList:List的主要实现类 /* * List中相对于Collection,新增加的方法 阅读全文
posted @ 2017-05-24 23:50 为了八千块 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Collection c=new ArrayList(); c.add(123); //迭代器遍历集合 Iterator i=c.Iterator(); while(i.hasNext()) { System.out.println(i.next()); } //增强for循环 遍历 for(obj 阅读全文
posted @ 2017-05-24 23:38 为了八千块 阅读(185) 评论(0) 推荐(0) 编辑