What is the difference between them? I know that
A LinkedHashSet is an ordered version of HashSet that maintains a doubly-linked List across all el
HashSet: Unordered actually. if u passing the parameter means
Set set=new HashSet(); for(int i=0;i
Out Put: May be 2,1,3 not predictable. next time another order.
2,1,3
LinkedHashSet() which produce FIFO Order.
LinkedHashSet()