Java集合的继承关系

图来自https://blog.csdn.net/biexiaofei/article/details/77031003

常问的:

  1. LinkedList继承自AbstractSequentiaList抽象类,并不是继承的AbstractList
  2. ArrayList继承自AbstractList抽象类
  3. Stack继承自Vector
  4. HashSet与TreeSet继承自AbstractSet,另外TreeSet实现了Sorted接口
  5. 而Sorted接口继承set接口
  6. HashMap继承了AbstractMap抽象类,而它的子类有LinkedHashMap(添加了保证顺序的功能)
  7. HashMap、WeakHashMap、HashTable、TreeMap、IdentityHashMap都继承了AbstractMap抽象类,而TreeMap又实现了SortedMap接口

相关文章:

  • 2022-01-19
  • 2021-04-15
  • 2021-12-23
  • 2021-10-15
  • 2021-08-17
  • 2022-12-23
  • 2021-09-09
  • 2022-02-01
猜你喜欢
  • 2022-12-23
  • 2021-08-06
  • 2021-07-09
  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案