美文网首页
HashMap与HashSet的区别(简述)

HashMap与HashSet的区别(简述)

作者: 懵智的大仁哥 | 来源:发表于2016-03-10 23:56 被阅读155次
区别 HashSet HashMap
内部实现 基于HashMap 基于数组和链表
元素特点 无序不重复 键值对,键不可重复
implements Set Map
hashCode 来自元素自身属性 hashCode(key)^hashCode(value)
检索速度

相关文章

网友评论

      本文标题:HashMap与HashSet的区别(简述)

      本文链接:https://www.haomeiwen.com/subject/omgtlttx.html