摘要:
LinkedHashSet is an extended version of HashSet. HashSet doesn’t follow any order where as LinkedHashSet maintains insertion order. HashSet uses HashM 阅读全文
posted @ 2016-02-09 19:41
gyt929458988
阅读(1737)
评论(0)
推荐(1)
摘要:
A Set contains no duplicate elements. That is one of the major reasons to use a set. There are 3 commonly used implementations of Set: HashSet, TreeSe 阅读全文
posted @ 2016-02-09 17:11
gyt929458988
阅读(714)
评论(0)
推荐(0)
摘要:
As you already know, LinkedHashSet is an ordered version of HashSet. That means, HashSet doesn’t maintain any order where as LinkedHashSet maintains i 阅读全文
posted @ 2016-02-09 16:50
gyt929458988
阅读(324)
评论(0)
推荐(0)
摘要:
TreeSet is another popular implementation of Set interface along with HashSet and LinkedHashSet. All these implementations of Set interface are requir 阅读全文
posted @ 2016-02-09 15:41
gyt929458988
阅读(225)
评论(0)
推荐(0)
摘要:
Arraylist,HashMap,HashSet等容器持有的的fail-fast迭代器,具体实现原理和modcount域有关. Lets looks at following code 01 public class FailFastIteratorTest { 02 03 public stat 阅读全文
posted @ 2016-02-09 10:49
gyt929458988
阅读(418)
评论(0)
推荐(0)
摘要:
今天看hashmap源码的时候遇见了fail-fast这个名词,找了一篇博客,学习一下: What is fail safe and fail fast Iterator in Java? Java Collections supports two types of Iterator, fail s 阅读全文
posted @ 2016-02-09 09:21
gyt929458988
阅读(742)
评论(0)
推荐(0)
浙公网安备 33010602011771号