Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to choose a Collection class in Java? Flowchart Example

One of the key skill of a Java programmer is his mastery over Collection framework, he must know when to use which Collection Class in Java. He must remember that Map is for key value pair, which List and Set is for storing values only. He should know that List is ordered collection, which allows duplicate but Set is unordered but doesn't allow duplicates. He should also be able to choose between Sorted Set, Map and other collection class which provides ordering e.g. LinkedHashMap and LinkedHashSet. To your surprise this is not at all a difficult task, all you need to remember is virtue of different collection class in Java. This article, help you to choose right collection class depending upon your requirement, by simply going through a flow chart and selecting collection where your requirement and their properties matches. 


This post first appeared on Javarevisited: Blog About Java Programmin, please read the originial post: here

Share the post

How to choose a Collection class in Java? Flowchart Example

×

Subscribe to Javarevisited: Blog About Java Programmin

Get updates delivered right to your inbox!

Thank you for your subscription

×