摘要: 1 HashMap 键值对,key底层是哈希表,依赖equals和hashCode方法 2 ArrayList 底层数据结构是数组,查询快,增删慢 3 TreeSet 底层数据结构是红黑树,采用默认构造器时内部仅采用了自然排序,此时的排序要求是元素必须实现Comparable接口。 阅读全文
posted @ 2015-02-13 17:22 刘江龙 阅读(460) 评论(1) 推荐(0)
摘要: TreeMap无参构造--Comparable--compareTo方法 TreeMap(比较器)构造--Comparator接口--compare方法 阅读全文
posted @ 2015-02-13 09:27 刘江龙 阅读(397) 评论(0) 推荐(0)
摘要: 哈希表--唯一性 链表--有序性 阅读全文
posted @ 2015-02-13 09:09 刘江龙 阅读(3718) 评论(0) 推荐(0)
摘要: HashMap的key一定要重写hashCode和equals方法 阅读全文
posted @ 2015-02-13 09:06 刘江龙 阅读(1568) 评论(0) 推荐(0)
摘要: Map存放键值对;Map集合的数据结构只和键有关;Map的键是唯一的; 阅读全文
posted @ 2015-02-13 08:50 刘江龙 阅读(423) 评论(0) 推荐(0)