一、类集框架是一组类和接口

二、位于java.util包中

三、主要用于存储和管理对象

四、主要分为三大类---集合、列表和映射

 

集合(Set)

列表(List)

映射(Map)

 

继承和实现关系

Iterator(Interface)

... ...

Collection(Interface)

  List(Interface)

    LinkedList

    ArrayList

  Set(Interface)

    HashSet

      LinkedHashSet

    SortedSet(Interface)

      TreeSet

  Map(Interface)

    HashMap

      LinkedHashMap

    SortedMap(Interface)

      TreeMap

Collection接口主要方法:

boolean add(Object o)

void clear()

boolean isEmpty()

remove(Object o)

int size()

Iterator iterator()

 

Iterator 主要成员方法:

boolean hasNext() 判断当前游标还有没有下一个元素

next() 返回下一个元素,并且游标向后移动一位

相关文章:

  • 2021-06-18
  • 2022-12-23
  • 2021-09-26
  • 2022-02-01
  • 2021-08-02
  • 2021-06-14
  • 2022-02-11
  • 2022-01-04
猜你喜欢
  • 2021-06-10
  • 2021-11-26
  • 2022-12-23
  • 2021-10-29
  • 2021-06-24
  • 2022-01-16
  • 2021-05-19
相关资源
相似解决方案