在Java中List, Set, Map是否继承自Collection接口?

List和Set是继承自Collection接口的接口,Set不允许重复的项目,List允许重复项目,
Set接口派生的类有TreeSet,HashSet,LinkedHashSet。
List接口派生的类有ArrayList,Vector等。

Map是独立的接口,不继承Collection接口。

posted @ 2021-08-10 16:02  不秃头就不会变强  阅读(1141)  评论(1)    收藏  举报