一.collection接口 1.collection常用方法 点击查看代码 @Test public void test(){ //contains() Collection coll = new ArrayList(); coll.add(123); coll.add(456); coll.add(new String("Tom")); coll.add(false); Person p = new Person("jerry", 23); coll.add(p
Queue接口与List.Set同一级别,都是继承了Collection接口.LinkedList实现了Queue接 口.在队列这种数据结构中,最先插入的元素将是最先被删除的元素:反之最后插入的元素将是最后被删除的元素,因此队列又称为“先进先出”(FIFO—first in first out)的线性表.在java5中新增加了java.util.Queue接口,用以支持队列的常见操作.该接口扩展了java.util.Collection接口. Queue使用时要尽量避免Collection的ad
09 Collection,Iterator,List,listIterator,Vector,ArrayList,LinkedList,泛型,增强for,可变参数,HashSet,LinkedHashSet,TreeSet import com.fly.bean.Student; public class Demo1_Array { public static void main(String[] args) { Student[] arr = new Student[5]; //创建引用类型