List、Set、Map 之间的区别是什么?

版权声明:转载请注名出处 https://blog.csdn.net/meism5/article/details/89730079

List、Set、Map 之间的区别是什么?

Collection框架关系图如下

List:有序集合

Set:不重复集合,LinkedHashSet按照插入排序,SortedSet可排序,HashSet无序

Map:键值对集合

详细使用可以参考:

https://www.cnblogs.com/IvesHe/p/6108933.html

https://blog.csdn.net/weixin_42311540/article/details/81196504

猜你喜欢

转载自blog.csdn.net/meism5/article/details/89730079
今日推荐