Category : Collections

Sorting is common functionality required by many applications. Questions like: How do we sort in Java? or What should we use as sorting algorithm? need to answered before we can perform any kind of sorting. Definitely we are not the first ones who require this feature and others have already done it before for us. So we can simple use the Java API provided to perform sorting.

Albert Attard
Author: 5 years ago

A question that some developers ask is, with many List (Java Doc) implementations, which one should one uses? The correct answer to this question is, it depends. In this article we compared various lists implementations and measured their performance when executing some common actions. Some implementations performed poorly when compared to the others are highlighted in the first two tests. This does not mean that those that did not do well should never be used. On the contrary, all implementations have their place and here we only considered single threading environment. Before using any given list, stop and think how this list is going to be used and run some tests like the ones we saw here before jumping into any hasty conclusions.

Albert Attard
Author: 5 years ago