Series: Collections Comparisons

Collections classes are compared and explained in simple terms

Vector vs ArrayList

When to prefer Vector vs ArrayList? By functionality, both are very similar. Both are derived from List interface. The most important difference is that Vector methods are synchronized where as ArrayList methods are not. In a multithreaded environment, when a number clients access same instance where data is very critical and important, it is advised …

Vector vs ArrayList Read More »

ArrayList vs LinkedList

There comes two classes ArrayList and LinkedList to store objects. Internally, ArrayList stores elements as an array form and LinkedList stores elements in node form. Due to their internal style of storing the elements, they come with different performance heads depending the nature of action performed like addition and retrieval. Programs are available at ArrayList …

ArrayList vs LinkedList Read More »