摘要: 1.list参数问题(无warnnings)public static void main(String[] args){ List list=new ArrayList(); list.add("ABDC"); list.add(1); list.add(new Thread())... 阅读全文
posted @ 2015-10-14 15:34 我在途中 阅读(350) 评论(0) 推荐(0)
摘要: 链表结构:static class HashMapEntry implements Entry { final K key; V value; final int hash; HashMapEntry next;......}数组存储所有链表:transient HashMa... 阅读全文
posted @ 2015-10-14 13:24 我在途中 阅读(1506) 评论(0) 推荐(0)
摘要: 1. LinkedHashMap概述: LinkedHashMap是Map接口的哈希表和链接列表实现,具有可预知的迭代顺序。此实现提供所有可选的映射操作,并允许使用null值和null键。此类不保证映射的顺序,特别是它不保证该顺序恒久不变。 LinkedHashMap实现与HashMap的不同之处在... 阅读全文
posted @ 2015-10-14 13:12 我在途中 阅读(229) 评论(0) 推荐(0)
摘要: hashmap的数据结构就是一个哈希表(散列表)hashmap: 1)数组:连续地址,查找迅速,但是占用内存太大 2)链表:地址不是连续的节省空间,查找较数组慢,删除和添加快 集合了两种数据结构的优点数组的目的:就是根据关键字的key利用散列函数映射地址,此地址就存储在数组中链表... 阅读全文
posted @ 2015-10-14 12:46 我在途中 阅读(278) 评论(0) 推荐(0)
摘要: 集合框架图iterator--listIteratorcollection---list---arraylist 动态数组collection--list---abstractsequenceList--linkedlist 链表collection--list--vector 同步的动态数组c... 阅读全文
posted @ 2015-10-14 12:37 我在途中 阅读(673) 评论(0) 推荐(0)