It’s a nice and a very informative article. It’s not easy to find a compressed but informative article on this. I think its value would exalt if some practical aspects of Collection interface were amalgamated.

Queue is heavily used in message-passing mechanisms (for instance, in process communications (Kafka, ActiveMQ, RabbitMQ) and multi-threaded programming (e.g. AKKA)) because of its FIFO nature. It’s a commonplace in circumstances where producer-consumer takes place. Legacy queues have a lot of adversities as well; thread contention is a good example. Hence, the inception of alternative structures such as Ring Buffers. LinkedList is used when the order is of significance. Apart from its algorithmic advantages (quick insertions and deletions), it’s heavily used in compiler designing toolkits (for Symbol Tables). There’re issues in these concrete collections as well. Some are thread-safe (i.e. can be used in a multi-threaded environments since their methods are synchronized — but they introduce latency) and some are not.

Sometimes, using the correct form of collection from this jar of collections is not an easy task, given the plethora of choices. But c’est la vie! ;) ;)

Software Engineer @ CodeGen International, CSE Graduate @ University of Moratuwa

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store