目录
499-集合介绍
500-集合体系图 背下来
501-Collection方法
502-迭代器遍历 itit(迭代器快捷键)(Ctrl+j)
503-集合增强for 快捷I
504-测试题


499-集合介绍


500-集合体系图 背下来

单列集合

双列集合(键值对)

501-Collection方法

接口不能直接被实例化,只有实现了接口的类才能被实例化

添加/删除






502-迭代器遍历 itit(迭代器快捷键)(Ctrl+j)




503-集合增强for 快捷I

public class CollectionFor {
    public static void main(String[] args) {
        Collection col = new ArrayList();
        col.add(new Book("三国演义","罗贯中",10.1));
        col.add(new Book("小李飞刀","古龙",5.1));
        col.add(new Book("红楼梦","曹雪芹",34.6));
        for(Object book:col){
            System.out.println("book="+book);
        }
    }
}
504-测试题




















