How to decide usage of Java Collections ???

ArrayList – orderd, fast iteration and fast random access.LinkedList – orderd,fast insertion and deletionHashSet – unsorted, unordered Set. no duplicates and you don’t care about order.LinkedHashSet– orderd, Use this class instead of HashSet when you care about the iteration order.TreeSet– Sorted.HashMap– unsorted, unordered. don’t care about the order.LinkedHashMap– maintains insertion order (or, optionally, access order).Continue reading “How to decide usage of Java Collections ???”

Rate this: